File tree Expand file tree Collapse file tree 4 files changed +32
-27
lines changed
src/views/account/AccountView Expand file tree Collapse file tree 4 files changed +32
-27
lines changed Original file line number Diff line number Diff line change 11{
22 "home" : " Home" ,
3+ "account" : " Account" ,
34 "userList" : " User list" ,
45 "Examples" : " Examples" ,
56 "giveAdminRights" : " Give admin rights" ,
Original file line number Diff line number Diff line change 11{
22 "home" : " Accueil" ,
3+ "account" : " Compte" ,
34 "userList" : " Utilisateurs" ,
45 "Examples" : " Exemples" ,
56 "giveAdminRights" : " Donner les droits admin" ,
Original file line number Diff line number Diff line change 11import { Container , Grid } from '@mui/material' ;
22import React from 'react' ;
3+ import { useTranslation } from 'react-i18next' ;
34import Page from '../../../components/Page' ;
45import Profile from './Profile' ;
56import ProfileDetails from './ProfileDetails' ;
67
7- const Account = ( ) => (
8- < Page
9- title = "Account"
10- >
11- < Container maxWidth = "lg" >
12- < Grid
13- container
14- spacing = { 3 }
15- >
16- < Grid
17- item
18- lg = { 4 }
19- md = { 6 }
20- xs = { 12 }
21- >
22- < Profile />
23- </ Grid >
8+ const Account = ( ) => {
9+ const { t } = useTranslation ( ) ;
10+
11+ return (
12+ < Page title = { t ( 'account' ) } >
13+ < Container maxWidth = "lg" >
2414 < Grid
25- item
26- lg = { 8 }
27- md = { 6 }
28- xs = { 12 }
15+ container
16+ spacing = { 3 }
2917 >
30- < ProfileDetails />
18+ < Grid
19+ item
20+ lg = { 4 }
21+ md = { 6 }
22+ xs = { 12 }
23+ >
24+ < Profile />
25+ </ Grid >
26+ < Grid
27+ item
28+ lg = { 8 }
29+ md = { 6 }
30+ xs = { 12 }
31+ >
32+ < ProfileDetails />
33+ </ Grid >
3134 </ Grid >
32- </ Grid >
33- </ Container >
34- </ Page >
35- ) ;
35+ </ Container >
36+ </ Page >
37+ ) ;
38+ } ;
3639
3740export default Account ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ const changePassword = (prisma: PrismaClient) => async (
103103 const user = await auth ( prisma , req ) ;
104104
105105 const userToUpdate = await prisma . user . findUniqueOrThrow ( {
106- where : { id : user . id } ,
106+ where : { id } ,
107107 } ) ;
108108
109109 // Check if user is self or admin
You can’t perform that action at this time.
0 commit comments