Fixed missing transflations in ScaffoldAuth and fontSize issues in Leaderboard view
This commit is contained in:
@@ -4,6 +4,7 @@ import { FunctionComponent } from 'react';
|
|||||||
import { Linking, Platform, useWindowDimensions } from 'react-native';
|
import { Linking, Platform, useWindowDimensions } from 'react-native';
|
||||||
import ButtonBase from './ButtonBase';
|
import ButtonBase from './ButtonBase';
|
||||||
import { translate } from '../../i18n/i18n';
|
import { translate } from '../../i18n/i18n';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import API, { APIError } from '../../API';
|
import API, { APIError } from '../../API';
|
||||||
import SeparatorBase from './SeparatorBase';
|
import SeparatorBase from './SeparatorBase';
|
||||||
import LinkBase from './LinkBase';
|
import LinkBase from './LinkBase';
|
||||||
@@ -38,6 +39,7 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
|
const { t } = useTranslation();
|
||||||
const [logo] = useAssets(
|
const [logo] = useAssets(
|
||||||
colorScheme == 'light'
|
colorScheme == 'light'
|
||||||
? require('../../assets/icon_light.png')
|
? require('../../assets/icon_light.png')
|
||||||
@@ -84,7 +86,7 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
|
|||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
title={translate('guestMode')}
|
title={t('guestMode')}
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
try {
|
try {
|
||||||
handleGuestLogin((accessToken: string) => {
|
handleGuestLogin((accessToken: string) => {
|
||||||
@@ -152,7 +154,7 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
|
|||||||
title={translate('continuewithgoogle')}
|
title={translate('continuewithgoogle')}
|
||||||
onPress={() => Linking.openURL(`${API.baseUrl}/auth/login/google`)}
|
onPress={() => Linking.openURL(`${API.baseUrl}/auth/login/google`)}
|
||||||
/>
|
/>
|
||||||
<SeparatorBase>or</SeparatorBase>
|
<SeparatorBase>{t('authOrSection')}</SeparatorBase>
|
||||||
<Stack
|
<Stack
|
||||||
space={3}
|
space={3}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
|
|||||||
@@ -52,12 +52,10 @@ export const BoardRow = ({ userAvatarUrl, userPseudo, userLvl, index }: BoardRow
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
|
fontSize={16}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 16,
|
|
||||||
fontStyle: 'normal',
|
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginHorizontal: 10,
|
marginHorizontal: 10,
|
||||||
fontWeight: '500',
|
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
}}
|
}}
|
||||||
isTruncated
|
isTruncated
|
||||||
@@ -86,14 +84,7 @@ export const BoardRow = ({ userAvatarUrl, userPseudo, userLvl, index }: BoardRow
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text
|
<Text fontSize={16} textAlign={'center'}>
|
||||||
style={{
|
|
||||||
fontSize: 16,
|
|
||||||
fontStyle: 'normal',
|
|
||||||
fontWeight: '500',
|
|
||||||
textAlign: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{index}
|
{index}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -62,15 +62,7 @@ export const PodiumCard = ({
|
|||||||
</Avatar>
|
</Avatar>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<Text
|
<Text fontSize={20} numberOfLines={2} isTruncated>
|
||||||
style={{
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: '500',
|
|
||||||
maxWidth: '100%',
|
|
||||||
}}
|
|
||||||
numberOfLines={2}
|
|
||||||
isTruncated
|
|
||||||
>
|
|
||||||
{userPseudo ?? '---'}
|
{userPseudo ?? '---'}
|
||||||
</Text>
|
</Text>
|
||||||
<View
|
<View
|
||||||
@@ -82,12 +74,7 @@ export const PodiumCard = ({
|
|||||||
gap: 5,
|
gap: 5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text
|
<Text fontSize={24} fontWeight={'bold'}>
|
||||||
style={{
|
|
||||||
fontSize: 24,
|
|
||||||
fontWeight: '500',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{userLvl ?? '-'}
|
{userLvl ?? '-'}
|
||||||
</Text>
|
</Text>
|
||||||
<MedalStar size="24" variant="Bold" color={medalColor} />
|
<MedalStar size="24" variant="Bold" color={medalColor} />
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ export const en = {
|
|||||||
downloadAPKInstructions:
|
downloadAPKInstructions:
|
||||||
"Go to the latest release, unfold the 'Assets' section, and click 'android-build.apk'.",
|
"Go to the latest release, unfold the 'Assets' section, and click 'android-build.apk'.",
|
||||||
discoverySuggestionSectionTitle: 'Suggested for you',
|
discoverySuggestionSectionTitle: 'Suggested for you',
|
||||||
|
authOrSection: 'or',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fr: typeof en = {
|
export const fr: typeof en = {
|
||||||
@@ -649,6 +650,7 @@ export const fr: typeof en = {
|
|||||||
downloadAPKInstructions:
|
downloadAPKInstructions:
|
||||||
"Télécharger 'android-build.apk' dans la section 'Assets' de la dernière release",
|
"Télécharger 'android-build.apk' dans la section 'Assets' de la dernière release",
|
||||||
discoverySuggestionSectionTitle: 'Suggéré pour vous',
|
discoverySuggestionSectionTitle: 'Suggéré pour vous',
|
||||||
|
authOrSection: 'ou',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const sp: typeof en = {
|
export const sp: typeof en = {
|
||||||
@@ -983,4 +985,5 @@ export const sp: typeof en = {
|
|||||||
downloadAPKInstructions:
|
downloadAPKInstructions:
|
||||||
"Descargue 'android-build.apk' en la sección 'Assets' de la última versión",
|
"Descargue 'android-build.apk' en la sección 'Assets' de la última versión",
|
||||||
discoverySuggestionSectionTitle: 'Sugerido para ti',
|
discoverySuggestionSectionTitle: 'Sugerido para ti',
|
||||||
|
authOrSection: 'o',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,24 +29,21 @@ const Leaderboardiew = () => {
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView style={{
|
<ScrollView
|
||||||
padding: 8,
|
style={{
|
||||||
}}>
|
padding: 8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Text
|
<Text
|
||||||
|
fontSize={20}
|
||||||
|
fontWeight={'500'}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: '500',
|
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{translate('leaderBoardHeading')}
|
{translate('leaderBoardHeading')}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text fontSize={14} fontWeight={'500'}>
|
||||||
style={{
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: '500',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{translate('leaderBoardHeadingFull')}
|
{translate('leaderBoardHeadingFull')}
|
||||||
</Text>
|
</Text>
|
||||||
<View
|
<View
|
||||||
|
|||||||
Reference in New Issue
Block a user