"chore: update frontend dev script to include lint checks and add ESLint config file"

This commit is contained in:
louiscklaw
2025-06-04 02:35:32 +08:00
parent c0fad42f0a
commit 22fb620eef
48 changed files with 3315 additions and 97 deletions

View File

@@ -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, {}>({

View File

@@ -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;
};