mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 20:21:50 +02:00
Add locale support (#228)
This commit is contained in:
parent
800af20132
commit
416a17c5b7
47 changed files with 967 additions and 467 deletions
|
@ -32,7 +32,13 @@ export function withSessionSsr(handler: GetServerSideProps) {
|
|||
req.session.user = await createGuestUser();
|
||||
await req.session.save();
|
||||
}
|
||||
return await handler(context);
|
||||
const res = await handler(context);
|
||||
|
||||
if ("props" in res) {
|
||||
return { ...res, props: { ...res.props, user: req.session.user } };
|
||||
}
|
||||
|
||||
return res;
|
||||
}, sessionOptions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue