mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-07 21:21:49 +02:00
✨ Use profile image from oauth provider (#1330)
This commit is contained in:
parent
be216344e2
commit
364bb8b83f
13 changed files with 95 additions and 29 deletions
|
@ -21,6 +21,7 @@ const userSchema = z.object({
|
|||
timeZone: z.string().nullish(),
|
||||
timeFormat: z.enum(["hours12", "hours24"]).nullish(),
|
||||
weekStart: z.number().min(0).max(6).nullish(),
|
||||
image: z.string().nullish(),
|
||||
});
|
||||
|
||||
export const UserContext = React.createContext<{
|
||||
|
@ -76,9 +77,10 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
|
|||
id: user.id as string,
|
||||
name: user.name ?? t("guest"),
|
||||
email: user.email || null,
|
||||
isGuest: !user.email,
|
||||
isGuest,
|
||||
tier,
|
||||
timeZone: user.timeZone ?? null,
|
||||
image: user.image ?? null,
|
||||
},
|
||||
refresh: session.update,
|
||||
ownsObject: ({ userId }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue