Debuglogs
parent
4748641c22
commit
d93f031589
|
@ -362,6 +362,13 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
|
|||
const { user: userParam } = paramsSchema.parse(context.params);
|
||||
// dynamic groups are not generated at build time, but otherwise are probably cached until infinity.
|
||||
const isDynamicGroup = getUsernameList(userParam).length > 1;
|
||||
console.log(
|
||||
"DynamicGroupLog",
|
||||
JSON.stringify({
|
||||
userParam,
|
||||
isDynamicGroup,
|
||||
})
|
||||
);
|
||||
if (isDynamicGroup) {
|
||||
return await getDynamicGroupPageProps(context);
|
||||
} else {
|
||||
|
|
|
@ -156,6 +156,13 @@ const paramsSchema = z.object({ type: z.string(), user: z.string() });
|
|||
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
|
||||
const { user } = paramsSchema.parse(context.params);
|
||||
const isDynamicGroup = getUsernameList(user).length > 1;
|
||||
console.log(
|
||||
"DynamicGroupLog",
|
||||
JSON.stringify({
|
||||
user,
|
||||
isDynamicGroup,
|
||||
})
|
||||
);
|
||||
|
||||
return isDynamicGroup ? await getDynamicGroupPageProps(context) : await getUserPageProps(context);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue