File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed
dev/src/app/(payload)/admin
payload/collection/fields Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { AccountRowLabel as AccountRowLabel_06d0cb594d8f6ba2ac35015f930c882e } from 'payload-authjs/components'
1
2
import { SignInWithAuthjsButton as SignInWithAuthjsButton_06d0cb594d8f6ba2ac35015f930c882e } from 'payload-authjs/components'
2
3
import { default as default_2c1e1c35da30a80d88551f9fcc61be66 } from 'src/payload/components/Greeting'
3
4
4
5
export const importMap = {
6
+ "payload-authjs/components#AccountRowLabel" : AccountRowLabel_06d0cb594d8f6ba2ac35015f930c882e ,
5
7
"payload-authjs/components#SignInWithAuthjsButton" : SignInWithAuthjsButton_06d0cb594d8f6ba2ac35015f930c882e ,
6
8
"/Greeting#default" : default_2c1e1c35da30a80d88551f9fcc61be66
7
9
}
Original file line number Diff line number Diff line change
1
+ "use client" ;
2
+
3
+ import { useRowLabel } from "@payloadcms/ui" ;
4
+ import type { Account } from "../authjs/types" ;
5
+
6
+ export const AccountRowLabel = ( ) => {
7
+ const { data : account } = useRowLabel < Account > ( ) ;
8
+
9
+ return (
10
+ < div
11
+ style = { {
12
+ display : "flex" ,
13
+ alignItems : "center" ,
14
+ gap : "0.5rem" ,
15
+ } }
16
+ >
17
+ < img
18
+ loading = "lazy"
19
+ src = { `https://authjs.dev/img/providers/${ account . provider } .svg` }
20
+ alt = "Provider"
21
+ style = { {
22
+ width : "1.5rem" ,
23
+ height : "1.5rem" ,
24
+ } }
25
+ />
26
+ < strong > { account . provider } </ strong > ({ account . providerAccountId } )
27
+ </ div >
28
+ ) ;
29
+ } ;
Original file line number Diff line number Diff line change
1
+ export { AccountRowLabel } from "./AccountRowLabel" ;
1
2
export { SignInWithAuthjsButton } from "./SignInWithAuthjsButton" ;
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ export const accountsField: Field = {
27
27
] ,
28
28
admin : {
29
29
initCollapsed : true ,
30
+ components : {
31
+ RowLabel : "payload-authjs/components#AccountRowLabel" ,
32
+ } ,
30
33
} ,
31
34
access : {
32
35
create : ( ) => false ,
You can’t perform that action at this time.
0 commit comments