-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: getting-started-migration #66
chore: getting-started-migration #66
Conversation
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
1a90089
to
63e64a3
Compare
apps/web/app/_trpc/trpc-provider.tsx
Outdated
@@ -118,6 +118,8 @@ export const TrpcProvider: React.FC<{ children: React.ReactNode; dehydratedState | |||
}) | |||
); | |||
|
|||
console.log(dehydratedState, "?????"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove it?
}, | ||
}; | ||
}; | ||
// export const getServerSideProps = async (context: GetServerSidePropsContext) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it mean it can be removed?
@@ -43,21 +45,22 @@ const stepTransform = (step: (typeof steps)[number]) => { | |||
}; | |||
|
|||
const stepRouteSchema = z.object({ | |||
step: z.array(z.enum(steps)).default([INITIAL_STEP]), | |||
step: z.enum(steps).default(INITIAL_STEP), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in pages dir in catch-all route[[...step]]
param will be represented by array { step: ['value']}
, but in app dir it will be just a single value
@@ -21,6 +21,26 @@ import { | |||
|
|||
import { createRecursiveProxy, createFlatProxy } from "@trpc/server/shared"; | |||
|
|||
export function getArrayQueryKey( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain what it does and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a fix for issue where queryKeys returned from createTRPCNextLayout
were different from keys created by @trpc/react-query
const ssr = await ssrInit(); | ||
await ssr.viewer.me.prefetch(); | ||
|
||
console.log(await JSON.stringify(ssr.dehydrate(), null, 2), "???"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove it?
throw new Error("User from session not found"); | ||
} | ||
|
||
// if (user.completedOnboarding) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this code relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
const h = headers(); | ||
const nonce = h.get("x-nonce") ?? undefined; | ||
|
||
// @TODO props.hasPengingInvites deprecated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this trigger any action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, but there is some commented code that relies on this prop, i will keep it
fc7e208
to
7124e5f
Compare
f141b21
to
5f9d301
Compare
5f9d301
to
25bda5c
Compare
What does this PR do?
Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist