Skip to content

Commit c2c9168

Browse files
committed
fix(auth): replace inline button class in chat auth components with AUTH_SUBMIT_BTN
1 parent 161bf02 commit c2c9168

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

apps/sim/app/chat/components/auth/email/email-auth.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Input, InputOTP, InputOTPGroup, InputOTPSlot, Label } from '@/component
77
import { cn } from '@/lib/core/utils/cn'
88
import { quickValidateEmail } from '@/lib/messaging/email/validation'
99
import AuthBackground from '@/app/(auth)/components/auth-background'
10+
import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes'
1011
import { SupportFooter } from '@/app/(auth)/components/support-footer'
1112
import Navbar from '@/app/(home)/components/navbar/navbar'
1213

@@ -240,11 +241,7 @@ export default function EmailAuth({ identifier, onAuthSuccess }: EmailAuthProps)
240241
)}
241242
</div>
242243

243-
<button
244-
type='submit'
245-
disabled={isSendingOtp}
246-
className='inline-flex h-[32px] w-full items-center justify-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-[430] font-season text-black text-sm transition-colors hover:border-[var(--border-1)] hover:bg-[var(--border-1)] disabled:cursor-not-allowed disabled:opacity-50'
247-
>
244+
<button type='submit' disabled={isSendingOtp} className={AUTH_SUBMIT_BTN}>
248245
{isSendingOtp ? (
249246
<span className='flex items-center gap-2'>
250247
<Loader2 className='h-4 w-4 animate-spin' />

apps/sim/app/chat/components/auth/password/password-auth.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Eye, EyeOff, Loader2 } from 'lucide-react'
66
import { Input, Label } from '@/components/emcn'
77
import { cn } from '@/lib/core/utils/cn'
88
import AuthBackground from '@/app/(auth)/components/auth-background'
9+
import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes'
910
import { SupportFooter } from '@/app/(auth)/components/support-footer'
1011
import Navbar from '@/app/(home)/components/navbar/navbar'
1112

@@ -160,7 +161,7 @@ export default function PasswordAuth({ identifier, onAuthSuccess }: PasswordAuth
160161
<button
161162
type='submit'
162163
disabled={!password.trim() || isAuthenticating}
163-
className='inline-flex h-[32px] w-full items-center justify-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-[430] font-season text-black text-sm transition-colors hover:border-[var(--border-1)] hover:bg-[var(--border-1)] disabled:cursor-not-allowed disabled:opacity-50'
164+
className={AUTH_SUBMIT_BTN}
164165
>
165166
{isAuthenticating ? (
166167
<span className='flex items-center gap-2'>

apps/sim/app/chat/components/error-state/error-state.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client'
22

33
import { useRouter } from 'next/navigation'
4+
import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes'
45
import { StatusPageLayout } from '@/app/(auth)/components/status-page-layout'
56

67
interface ChatErrorStateProps {
@@ -12,10 +13,7 @@ export function ChatErrorState({ error }: ChatErrorStateProps) {
1213

1314
return (
1415
<StatusPageLayout title='Chat Unavailable' description={error}>
15-
<button
16-
onClick={() => router.push('/workspace')}
17-
className='inline-flex h-[32px] w-full items-center justify-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-[430] font-season text-black text-sm transition-colors hover:border-[var(--border-1)] hover:bg-[var(--border-1)] disabled:cursor-not-allowed disabled:opacity-50'
18-
>
16+
<button onClick={() => router.push('/workspace')} className={AUTH_SUBMIT_BTN}>
1917
Return to Workspace
2018
</button>
2119
</StatusPageLayout>

0 commit comments

Comments
 (0)