Skip to content

Commit b710e9a

Browse files
committed
chore: remove OAuth login handlers, comment out OAuth button sections, update sidebar icon
1 parent 4579597 commit b710e9a

3 files changed

Lines changed: 44 additions & 42 deletions

File tree

frontend/src/components/auth/login-modal.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function LoginModal({
3333
onClose,
3434
onSwitchToRegister
3535
}: Readonly<LoginModalProperties>) {
36-
const { login, loginWithGoogle, loginWithGitHub, isLoading, error, clearError } = useAuth();
36+
const { login, isLoading, error, clearError } = useAuth();
3737

3838
const { values, errors, handleChange, handleSubmit, resetForm } = useForm<LoginFormValues>({
3939
initialValues: LOGIN_INITIAL_VALUES,
@@ -72,23 +72,24 @@ export function LoginModal({
7272
}
7373
};
7474

75-
const handleGoogleLogin = async () => {
76-
try {
77-
await loginWithGoogle();
78-
onClose();
79-
} catch {
80-
// Error handled by context
81-
}
82-
};
83-
84-
const handleGitHubLogin = async () => {
85-
try {
86-
await loginWithGitHub();
87-
onClose();
88-
} catch {
89-
// Error handled by context
90-
}
91-
};
75+
// OAuth handlers commented out - not supported in v1
76+
// const handleGoogleLogin = async () => {
77+
// try {
78+
// await loginWithGoogle();
79+
// onClose();
80+
// } catch {
81+
// // Error handled by context
82+
// }
83+
// };
84+
85+
// const handleGitHubLogin = async () => {
86+
// try {
87+
// await loginWithGitHub();
88+
// onClose();
89+
// } catch {
90+
// // Error handled by context
91+
// }
92+
// };
9293

9394
return (
9495
<Modal
@@ -104,7 +105,7 @@ export function LoginModal({
104105
{/* Global Error */}
105106
{error && <AuthErrorAlert error={error} onDismiss={clearError} />}
106107

107-
{/* OAuth Buttons */}
108+
{/* OAuth Buttons - Hidden for v1, uncomment when OAuth is implemented
108109
<div className='space-y-2'>
109110
<Button
110111
type='button'
@@ -150,7 +151,6 @@ export function LoginModal({
150151
</Button>
151152
</div>
152153
153-
{/* Divider */}
154154
<div className='relative'>
155155
<div className='absolute inset-0 flex items-center'>
156156
<span className='border-syft-border w-full border-t' />
@@ -159,6 +159,7 @@ export function LoginModal({
159159
<span className='font-inter text-syft-muted bg-white px-2'>Or continue with</span>
160160
</div>
161161
</div>
162+
End of OAuth section */}
162163

163164
{/* Email/Password Form */}
164165
<form onSubmit={handleSubmit} className='space-y-4'>

frontend/src/components/auth/register-modal.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function RegisterModal({
5454
onClose,
5555
onSwitchToLogin
5656
}: Readonly<RegisterModalProperties>) {
57-
const { register, loginWithGoogle, loginWithGitHub, isLoading, error, clearError } = useAuth();
57+
const { register, isLoading, error, clearError } = useAuth();
5858
const [requiresAccountingPassword, setRequiresAccountingPassword] = useState(false);
5959

6060
const { values, errors, handleChange, handleSubmit, resetForm, setFieldError } =
@@ -116,23 +116,24 @@ export function RegisterModal({
116116
}
117117
};
118118

119-
const handleGoogleRegister = async () => {
120-
try {
121-
await loginWithGoogle();
122-
onClose();
123-
} catch {
124-
// Error handled by context
125-
}
126-
};
127-
128-
const handleGitHubRegister = async () => {
129-
try {
130-
await loginWithGitHub();
131-
onClose();
132-
} catch {
133-
// Error handled by context
134-
}
135-
};
119+
// OAuth handlers commented out - not supported in v1
120+
// const handleGoogleRegister = async () => {
121+
// try {
122+
// await loginWithGoogle();
123+
// onClose();
124+
// } catch {
125+
// // Error handled by context
126+
// }
127+
// };
128+
129+
// const handleGitHubRegister = async () => {
130+
// try {
131+
// await loginWithGitHub();
132+
// onClose();
133+
// } catch {
134+
// // Error handled by context
135+
// }
136+
// };
136137

137138
const passwordStrength = getPasswordStrengthInfo(values.password);
138139

@@ -157,7 +158,7 @@ export function RegisterModal({
157158
{/* Global Error */}
158159
{error && <AuthErrorAlert error={error} onDismiss={clearError} />}
159160

160-
{/* OAuth Buttons */}
161+
{/* OAuth Buttons - Hidden for v1, uncomment when OAuth is implemented
161162
<div className='space-y-2'>
162163
<Button
163164
type='button'
@@ -203,7 +204,6 @@ export function RegisterModal({
203204
</Button>
204205
</div>
205206
206-
{/* Divider */}
207207
<div className='relative'>
208208
<div className='absolute inset-0 flex items-center'>
209209
<span className='border-syft-border w-full border-t' />
@@ -212,6 +212,7 @@ export function RegisterModal({
212212
<span className='font-inter text-syft-muted bg-white px-2'>Or create account with</span>
213213
</div>
214214
</div>
215+
End of OAuth section */}
215216

216217
{/* Registration Form */}
217218
<form onSubmit={handleSubmit} className='space-y-4'>

frontend/src/components/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type React from 'react';
22

3-
import { Database, FileText, Globe, MessageSquare, Sparkles } from 'lucide-react';
3+
import { FileText, Globe, MessageSquare, Sparkles, UserPlus } from 'lucide-react';
44
import { NavLink } from 'react-router-dom';
55

66
import { useAuth } from '@/context/auth-context';
@@ -19,7 +19,7 @@ const navItems: NavItem[] = [
1919
{ id: 'home', path: '/', label: 'Chat', icon: MessageSquare, protected: false },
2020
{ id: 'browse', path: '/browse', label: 'Browse', icon: Globe, protected: false },
2121
{ id: 'build', path: '/build', label: 'Build', icon: FileText, protected: false },
22-
{ id: 'endpoints', path: '/endpoints', label: 'Endpoints', icon: Database, protected: true }
22+
{ id: 'endpoints', path: '/endpoints', label: 'Participate', icon: UserPlus, protected: true }
2323
];
2424

2525
/**

0 commit comments

Comments
 (0)