Skip to content
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

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

DmytroHryshyn
Copy link

What does this PR do?

Fixes # (issue)

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

@DmytroHryshyn DmytroHryshyn marked this pull request as draft October 26, 2023 13:32
@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes!

@DmytroHryshyn DmytroHryshyn force-pushed the intuita/getting-started-page branch from 1a90089 to 63e64a3 Compare November 3, 2023 17:46
@DmytroHryshyn DmytroHryshyn marked this pull request as ready for review November 7, 2023 12:32
@@ -118,6 +118,8 @@ export const TrpcProvider: React.FC<{ children: React.ReactNode; dehydratedState
})
);

console.log(dehydratedState, "?????");
Copy link

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) => {
Copy link

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),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Author

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(
Copy link

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?

Copy link
Author

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), "???");
Copy link

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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this code relevant?

Copy link
Author

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?
Copy link

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?

Copy link
Author

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

@hbjORbj hbjORbj force-pushed the intuita/app-router-migration branch from fc7e208 to 7124e5f Compare November 7, 2023 17:33
@DmytroHryshyn DmytroHryshyn force-pushed the intuita/getting-started-page branch 2 times, most recently from f141b21 to 5f9d301 Compare November 8, 2023 14:50
@DmytroHryshyn DmytroHryshyn force-pushed the intuita/getting-started-page branch from 5f9d301 to 25bda5c Compare November 8, 2023 15:14
@hbjORbj hbjORbj merged commit 5cdf8cf into intuita/app-router-migration Nov 8, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants