-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
2e7f47e
commit 29cf448
Showing
27 changed files
with
290 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
import { z } from 'zod' | ||
|
||
import { GENRES, Genre, convertGenreLabelToValue } from 'utils/genres' | ||
|
||
const excludedGenres = new Set<string>([ | ||
Genre.COMEDY, | ||
Genre.KIDS, | ||
Genre.SOUNDTRACK, | ||
Genre.DEVOTIONAL, | ||
Genre.AUDIOBOOKS, | ||
Genre.SPOKEN_WORK | ||
]) | ||
|
||
export const selectableGenres = GENRES.filter( | ||
(genre) => !excludedGenres.has(genre) | ||
).map((genre) => ({ | ||
value: genre, | ||
label: convertGenreLabelToValue(genre) | ||
})) | ||
|
||
export const selectGenresSchema = z.object({ | ||
genres: z.array(z.string()).min(3) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/mobile/src/screens/sign-on-screen/components/EmailInUseHint.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
emailSchemaMessages, | ||
createEmailPageMessages as messages | ||
} from '@audius/common' | ||
import { ErrorMessage } from 'formik' | ||
|
||
import { Hint, IconError, Text } from '@audius/harmony-native' | ||
|
||
type EmailInUseHintProps = { | ||
onChangeScreen: (screen: string) => void | ||
} | ||
|
||
export const EmailInUseHint = (props: EmailInUseHintProps) => { | ||
const { onChangeScreen } = props | ||
|
||
return ( | ||
<ErrorMessage name='email'> | ||
{(errorMessage) => | ||
errorMessage === emailSchemaMessages.emailInUse ? ( | ||
<Hint icon={IconError}> | ||
<Text variant='body' size='m' textAlign='center'> | ||
{emailSchemaMessages.emailInUse}{' '} | ||
<Text onPress={() => onChangeScreen('sign-in')} color='accent'> | ||
{messages.signIn} | ||
</Text> | ||
</Text> | ||
</Hint> | ||
) : null | ||
} | ||
</ErrorMessage> | ||
) | ||
} |
5 changes: 0 additions & 5 deletions
5
...s/mobile/src/screens/sign-on-screen/components/temp-harmony/IconExclamation.svg
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.