Front: Add Missing Translation + Prettier
This commit is contained in:
34
front/API.ts
34
front/API.ts
@@ -233,16 +233,16 @@ export default class API {
|
||||
// To be fixed with #168
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(song: any) =>
|
||||
({
|
||||
id: song.id as number,
|
||||
name: song.name as string,
|
||||
artistId: song.artistId as number,
|
||||
albumId: song.albumId as number,
|
||||
genreId: song.genreId as number,
|
||||
details: song.difficulties,
|
||||
cover: `${baseAPIUrl}/song/${song.id}/illustration`,
|
||||
metrics: {},
|
||||
} as Song)
|
||||
({
|
||||
id: song.id as number,
|
||||
name: song.name as string,
|
||||
artistId: song.artistId as number,
|
||||
albumId: song.albumId as number,
|
||||
genreId: song.genreId as number,
|
||||
details: song.difficulties,
|
||||
cover: `${baseAPIUrl}/song/${song.id}/illustration`,
|
||||
metrics: {},
|
||||
} as Song)
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -475,13 +475,13 @@ export default class API {
|
||||
// To be fixed with #168
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(e: any) =>
|
||||
({
|
||||
id: e.id,
|
||||
query: e.query,
|
||||
type: e.type,
|
||||
userId: e.userId,
|
||||
timestamp: new Date(e.searchDate),
|
||||
} as SearchHistory)
|
||||
({
|
||||
id: e.id,
|
||||
query: e.query,
|
||||
type: e.type,
|
||||
userId: e.userId,
|
||||
timestamp: new Date(e.searchDate),
|
||||
} as SearchHistory)
|
||||
)
|
||||
),
|
||||
};
|
||||
|
||||
@@ -364,7 +364,7 @@ export const fr: typeof en = {
|
||||
noRecentSearches: 'Aucune recherche récente',
|
||||
};
|
||||
|
||||
export const sp: Partial<typeof en> = {
|
||||
export const sp: typeof en = {
|
||||
error: 'Error',
|
||||
anErrorOccured: 'ocurrió un error',
|
||||
goBackHome: 'regresar a casa',
|
||||
@@ -547,4 +547,5 @@ export const sp: Partial<typeof en> = {
|
||||
|
||||
recentSearches: 'Búsquedas recientes',
|
||||
noRecentSearches: 'No hay búsquedas recientes',
|
||||
continuewithgoogle: 'Continuar con Google',
|
||||
};
|
||||
|
||||
@@ -57,11 +57,11 @@ const AuthenticationView = ({ isSignup }: RouteProps<AuthenticationViewProps>) =
|
||||
<Translate translationKey="welcome" />
|
||||
</Text>
|
||||
<TextButton
|
||||
translate={{ translationKey: "continuewithgoogle" }}
|
||||
translate={{ translationKey: 'continuewithgoogle' }}
|
||||
variant="outline"
|
||||
marginTop={5}
|
||||
colorScheme="primary"
|
||||
onPress={() => window.location.href = `${baseAPIUrl}/auth/login/google`}
|
||||
onPress={() => (window.location.href = `${baseAPIUrl}/auth/login/google`)}
|
||||
/>
|
||||
{mode === 'signin' ? (
|
||||
<SigninForm
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect } from "react"
|
||||
import { useDispatch } from "react-redux";
|
||||
import API, { AccessToken } from "../API";
|
||||
import { setAccessToken } from "../state/UserSlice";
|
||||
import { useEffect } from 'react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import API, { AccessToken } from '../API';
|
||||
import { setAccessToken } from '../state/UserSlice';
|
||||
|
||||
const GoogleView = () => {
|
||||
const dispatch = useDispatch();
|
||||
@@ -11,13 +11,13 @@ const GoogleView = () => {
|
||||
const accessToken = await API.fetch({
|
||||
route: `/auth/logged/google${window.location.search}`,
|
||||
method: 'GET',
|
||||
}).then((responseBody) => responseBody.access_token as AccessToken)
|
||||
dispatch(setAccessToken(accessToken))
|
||||
}).then((responseBody) => responseBody.access_token as AccessToken);
|
||||
dispatch(setAccessToken(accessToken));
|
||||
}
|
||||
run();
|
||||
}, []);
|
||||
|
||||
return <p>Loading please wait</p>;
|
||||
}
|
||||
};
|
||||
|
||||
export default GoogleView;
|
||||
|
||||
@@ -91,7 +91,7 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => {
|
||||
type: 'text',
|
||||
title: 'Google Account',
|
||||
data: {
|
||||
text: user.googleID ? "Linked" : "Not linked"
|
||||
text: user.googleID ? 'Linked' : 'Not linked',
|
||||
},
|
||||
// type: 'custom',
|
||||
// data: user.googleID
|
||||
|
||||
Reference in New Issue
Block a user