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 1
1
{
2
2
"home" : " Home" ,
3
+ "account" : " Account" ,
3
4
"userList" : " User list" ,
4
5
"Examples" : " Examples" ,
5
6
"giveAdminRights" : " Give admin rights" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"home" : " Accueil" ,
3
+ "account" : " Compte" ,
3
4
"userList" : " Utilisateurs" ,
4
5
"Examples" : " Exemples" ,
5
6
"giveAdminRights" : " Donner les droits admin" ,
Original file line number Diff line number Diff line change 1
1
import { Container , Grid } from '@mui/material' ;
2
2
import React from 'react' ;
3
+ import { useTranslation } from 'react-i18next' ;
3
4
import Page from '../../../components/Page' ;
4
5
import Profile from './Profile' ;
5
6
import ProfileDetails from './ProfileDetails' ;
6
7
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" >
24
14
< Grid
25
- item
26
- lg = { 8 }
27
- md = { 6 }
28
- xs = { 12 }
15
+ container
16
+ spacing = { 3 }
29
17
>
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 >
31
34
</ Grid >
32
- </ Grid >
33
- </ Container >
34
- </ Page >
35
- ) ;
35
+ </ Container >
36
+ </ Page >
37
+ ) ;
38
+ } ;
36
39
37
40
export default Account ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ const changePassword = (prisma: PrismaClient) => async (
103
103
const user = await auth ( prisma , req ) ;
104
104
105
105
const userToUpdate = await prisma . user . findUniqueOrThrow ( {
106
- where : { id : user . id } ,
106
+ where : { id } ,
107
107
} ) ;
108
108
109
109
// Check if user is self or admin
You can’t perform that action at this time.
0 commit comments