Skip to content

Commit

Permalink
onboarding: PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesacklin committed Nov 12, 2024
1 parent 8da9d8e commit a3113ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 deletions.
23 changes: 7 additions & 16 deletions apps/tlon-mobile/src/screens/Onboarding/SignupScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ import { HostingError } from '@tloncorp/app/lib/hostingApi';
import { trackOnboardingAction } from '@tloncorp/app/utils/posthog';
import { createDevLogger } from '@tloncorp/shared';
import {
Button,
Field,
KeyboardAvoidingView,
OnboardingInviteBlock,
OnboardingTextBlock,
PrimaryButton,
ScreenHeader,
Spinner,
TextInput,
TlonText,
View,
Expand Down Expand Up @@ -241,9 +240,9 @@ export const SignupScreen = ({ navigation }: Props) => {
/>
)}

<Button
<PrimaryButton
onPress={onSubmit}
hero
loading={isSubmitting}
disabled={
isSubmitting ||
remoteError !== undefined ||
Expand All @@ -252,18 +251,10 @@ export const SignupScreen = ({ navigation }: Props) => {
: !emailForm.formState.isValid)
}
>
{isSubmitting ? (
<>
<Spinner />
<TlonText.Text>Please wait&hellip;</TlonText.Text>
</>
) : (
<TlonText.Text color="$background" size="$label/l">
Sign up with{' '}
{otpMethod === 'phone' ? 'phone number' : 'email'}
</TlonText.Text>
)}
</Button>
<TlonText.Text color="$background" size="$label/l">
Sign up
</TlonText.Text>
</PrimaryButton>
<TlonText.Text
marginTop="$m"
textAlign="center"
Expand Down
22 changes: 7 additions & 15 deletions apps/tlon-mobile/src/screens/Onboarding/TlonLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import {
import { HostingError } from '@tloncorp/app/lib/hostingApi';
import { createDevLogger } from '@tloncorp/shared';
import {
Button,
Field,
KeyboardAvoidingView,
OnboardingTextBlock,
PrimaryButton,
ScreenHeader,
Spinner,
TextInput,
TlonText,
View,
Expand Down Expand Up @@ -188,9 +187,9 @@ export const TlonLoginScreen = ({ navigation, route }: Props) => {
/>
)}

<Button
<PrimaryButton
onPress={onSubmit}
hero
loading={isSubmitting}
disabled={
isSubmitting ||
remoteError !== undefined ||
Expand All @@ -199,17 +198,10 @@ export const TlonLoginScreen = ({ navigation, route }: Props) => {
: !emailForm.formState.isValid)
}
>
{isSubmitting ? (
<>
<Spinner />
<TlonText.Text>Please wait&hellip;</TlonText.Text>
</>
) : (
<TlonText.Text color="$background" size="$label/l">
Send code to log in
</TlonText.Text>
)}
</Button>
<TlonText.Text color="$background" size="$label/l">
Send code to log in
</TlonText.Text>
</PrimaryButton>

<TlonText.Text
textAlign="center"
Expand Down

0 comments on commit a3113ef

Please sign in to comment.