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

WIP: Feat: Migrate to tRPC v11 #472

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
"@react-email/render": "0.0.12",
"@stoplight/elements": "8.1.0",
"@t3-oss/env-nextjs": "0.7.3",
"@tanstack/react-query": "4.36.1",
"@tanstack/react-query-devtools": "4.36.1",
"@trpc/client": "10.45.2",
"@trpc/react-query": "10.45.2",
"@trpc/server": "10.45.2",
"@tanstack/react-query": "5.35.1",
"@tanstack/react-query-devtools": "5.35.1",
"@trpc/client": "11.0.0-rc.364",
"@trpc/next": "11.0.0-rc.364",
"@trpc/react-query": "11.0.0-rc.364",
"@trpc/server": "11.0.0-rc.364",
"bcrypt": "5.1.1",
"chakra-react-select": "4.7.6",
"colorette": "2.0.20",
Expand Down
143 changes: 72 additions & 71 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/features/account/AccountEmailForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const AccountEmailForm = () => {

return (
<>
{account.isLoading && <LoaderFull />}
{account.isPending && <LoaderFull />}
{account.isError && <ErrorPage />}
{account.isSuccess && (
<Stack spacing={4}>
Expand All @@ -80,7 +80,7 @@ export const AccountEmailForm = () => {
type="submit"
variant="@primary"
isDisabled={account.data.email === email}
isLoading={updateEmail.isLoading}
isLoading={updateEmail.isPending}
>
{t('account:email.actions.update')}
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/features/account/AccountProfileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const AccountProfileForm = () => {

return (
<>
{account.isLoading && <LoaderFull />}
{account.isPending && <LoaderFull />}
{account.isError && <ErrorPage />}
{account.isSuccess && (
<Stack spacing={4}>
Expand All @@ -84,7 +84,7 @@ export const AccountProfileForm = () => {
<Button
type="submit"
variant="@primary"
isLoading={updateAccount.isLoading}
isLoading={updateAccount.isPending}
>
{t('account:profile.actions.update')}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/features/account/EmailVerificationCodeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const EmailVerificationCodeModale = () => {
<VerificationCodeForm
email={searchParams.verifyEmail ?? ''}
isLoading={
updateEmailValidate.isLoading || updateEmailValidate.isSuccess
updateEmailValidate.isPending || updateEmailValidate.isSuccess
}
/>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion src/features/admin/AdminNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const AdminNavBarAccountMenu = ({ ...rest }: Omit<MenuProps, 'children'>) => {
<Menu placement="bottom-end" {...rest}>
<MenuButton borderRadius="full" _focusVisible={{ shadow: 'outline' }}>
<Avatar size="sm" icon={<></>} name={account.data?.email ?? ''}>
{account.isLoading && <Spinner size="xs" />}
{account.isPending && <Spinner size="xs" />}
</Avatar>
</MenuButton>
<MenuList maxW="12rem" overflow="hidden">
Expand Down
2 changes: 1 addition & 1 deletion src/features/app/AppNavBarDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const AppNavBarDesktop = (props: BoxProps) => {
}
: {})}
>
{account.isLoading && <Spinner size="xs" />}
{account.isPending && <Spinner size="xs" />}
</Avatar>
</HStack>
</Container>
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const LoginForm = ({
/>
<Flex>
<Button
isLoading={login.isLoading || login.isSuccess}
isLoading={login.isPending || login.isSuccess}
type="submit"
variant={buttonVariant}
size="lg"
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/PageAdminLoginValidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function PageAdminLoginValidate() {
<Form {...form} onSubmit={onSubmit}>
<VerificationCodeForm
email={email ?? ''}
isLoading={validate.isLoading || validate.isSuccess}
isLoading={validate.isPending || validate.isSuccess}
/>
</Form>
</CardBody>
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/PageLoginValidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function PageLoginValidate() {
<Form {...form} onSubmit={onSubmit}>
<VerificationCodeForm
email={email ?? ''}
isLoading={validate.isLoading || validate.isSuccess}
isLoading={validate.isPending || validate.isSuccess}
/>
</Form>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/PageRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function PageRegister() {
/>
<Flex>
<Button
isLoading={register.isLoading}
isLoading={register.isPending}
type="submit"
variant="@primary"
flex={1}
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/PageRegisterValidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function PageRegisterValidate() {
<Form {...form} onSubmit={onSubmit}>
<VerificationCodeForm
email={email ?? ''}
isLoading={validate.isLoading || validate.isSuccess}
isLoading={validate.isPending || validate.isSuccess}
/>
</Form>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/features/repositories/AdminRepositoryActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const AdminRepositoryActions = ({

return (
<Menu placement="left-start" {...rest}>
<MenuButton as={ActionsButton} isLoading={repositoryRemove.isLoading} />
<MenuButton as={ActionsButton} isLoading={repositoryRemove.isPending} />
<Portal>
<MenuList>
<MenuItem
Expand Down
2 changes: 1 addition & 1 deletion src/features/repositories/PageAdminRepositories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function PageAdminRepositories() {
</HStack>

<DataList>
{repositories.isLoading && <DataListLoadingState />}
{repositories.isPending && <DataListLoadingState />}
{repositories.isError && (
<DataListErrorState
title={t('repositories:feedbacks.loadingRepositoryError.title')}
Expand Down
Loading
Loading