"chore: update frontend dev script to include lint checks and add ESLint config file"
This commit is contained in:
@@ -7,11 +7,7 @@ interface StateProps {
|
||||
}
|
||||
|
||||
const HomeOrTutorial: React.FC<StateProps> = ({ hasSeenTutorial }) => {
|
||||
return hasSeenTutorial ? (
|
||||
<Redirect to="/tabs/schedule" />
|
||||
) : (
|
||||
<Redirect to="/tutorial" />
|
||||
);
|
||||
return hasSeenTutorial ? <Redirect to="/tabs/events" /> : <Redirect to="/tutorial" />;
|
||||
};
|
||||
|
||||
export default connect<{}, StateProps, {}>({
|
||||
|
@@ -6,15 +6,12 @@ interface RedirectToLoginProps {
|
||||
setUsername: Function;
|
||||
}
|
||||
|
||||
const RedirectToLogin: React.FC<RedirectToLoginProps> = ({
|
||||
setIsLoggedIn,
|
||||
setUsername,
|
||||
}) => {
|
||||
const RedirectToLogin: React.FC<RedirectToLoginProps> = ({ setIsLoggedIn, setUsername }) => {
|
||||
const ionRouterContext = useContext(IonRouterContext);
|
||||
useEffect(() => {
|
||||
setIsLoggedIn(false);
|
||||
setUsername(undefined);
|
||||
ionRouterContext.push('/tabs/schedule');
|
||||
ionRouterContext.push('/tabs/events');
|
||||
}, [setIsLoggedIn, setUsername]);
|
||||
return null;
|
||||
};
|
||||
|
Reference in New Issue
Block a user