Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/frontend prep #248

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/sac-mobile/app/(auth)/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const Login = () => {
data.password
);
login(tokens, user);
console.log(`Logged in, ${user}, ${tokens}`);
router.push('/(app)/');
} catch (e: unknown) {
if (e instanceof ZodError) {
Expand Down
4 changes: 0 additions & 4 deletions frontend/sac-mobile/app/(auth)/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const Register = () => {
)}
name="firstName"
rules={{ required: 'First name is required' }}
defaultValue=""
/>
{errors.firstName && <Text>{errors.firstName.message}</Text>}
</View>
Expand All @@ -84,7 +83,6 @@ const Register = () => {
)}
name="lastName"
rules={{ required: 'Last name is required' }}
defaultValue=""
/>
{errors.lastName && <Text>{errors.lastName.message}</Text>}
</View>
Expand All @@ -104,7 +102,6 @@ const Register = () => {
)}
name="email"
rules={{ required: 'Email is required' }}
defaultValue=""
/>
{errors.email && <Text>{errors.email.message}</Text>}
</View>
Expand All @@ -125,7 +122,6 @@ const Register = () => {
)}
name="password"
rules={{ required: 'Password is required' }}
defaultValue=""
/>
{errors.password && <Text>{errors.password.message}</Text>}
</View>
Expand Down
9 changes: 3 additions & 6 deletions frontend/sac-mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ function RootLayoutNav() {
if (accessToken && refreshToken) {
login({ accessToken, refreshToken }, user);
}

console.log('accessToken', accessToken);
};

checkLoginStatus();
Expand All @@ -73,12 +71,11 @@ function RootLayoutNav() {

if (!isLoggedIn) {
router.push('/(auth)/login');
} else {
router.push('/(app)/');
return;
}
}, [isLoggedIn]);

console.log('isLoggedIn', isLoggedIn);
router.push('/(app)/');
}, [isLoggedIn]);

return (
<Stack>
Expand Down