Mik3y-F
Mik3y-F
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Mik3y-F on 5/3/2023 in #questions
How do I make Jotai work with trpc on the t3 stack?
@whatplan I would like to use it to set and store the active organisation state globally in my app. That means I have to use trpc to make the call. But how do I make it work with both TRPC and Next when there's both a createTRPCNext and createTRPCJotai in the trpc/next and jotai-trpc libs
4 replies
TTCTheo's Typesafe Cult
Created by DrMonro on 3/13/2023 in #questions
jotai-trpc and create-t3-app
hey, wish you'd post the solution here
10 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 4/28/2023 in #questions
I'm having trouble using the shadcn-ui Sheet component
lol realised I imported the wrong Sheet 😅
4 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 4/7/2023 in #questions
How do I solve for a persisting session on Next-auth when User is deleted from DB.
is it, possible to make the nextjs middleware feature work with the database strategy on nextauth?
17 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 4/7/2023 in #questions
How do I solve for a persisting session on Next-auth when User is deleted from DB.
okay, noted. Kind sir 😅
17 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 4/7/2023 in #questions
How do I solve for a persisting session on Next-auth when User is deleted from DB.
okay, and there's no way to go around it when using jwts ?
17 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 4/7/2023 in #questions
How do I solve for a persisting session on Next-auth when User is deleted from DB.
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)

@@index([userId])
}
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)

@@index([userId])
}
17 replies
TTCTheo's Typesafe Cult
Created by Mugetsu on 12/21/2022 in #questions
tRPC query | mutation Error Boundary catch
Thanks, got a solution on my end too
6 replies
TTCTheo's Typesafe Cult
Created by Mugetsu on 12/21/2022 in #questions
tRPC query | mutation Error Boundary catch
@Mugetsu did you ever find an answer to this?
6 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 11/6/2022 in #questions
Per-Page Layouts in T3
Dope stuff ..... Thank you sooo much for the work around
19 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 11/6/2022 in #questions
Per-Page Layouts in T3
Ahaaaaaa thanks Man works for me too ...
19 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 11/6/2022 in #questions
Per-Page Layouts in T3
the one on the return getLayout call argument is this
Argument of type 'Element' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>> & NextPage<{}, {}>'.
Type 'ReactElement<any, any>' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> & FunctionComponent<{}> & { getInitialProps?(context: NextPageContext): {} | Promise<...>; }'.
Type 'ReactElement<any, any>' is not assignable to type 'FunctionComponent<{}>'.
Type 'ReactElement<any, any>' provides no match for the signature '(props: {}, context?: any): ReactElement<any, any> | null'.ts(2345)
Argument of type 'Element' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>> & NextPage<{}, {}>'.
Type 'ReactElement<any, any>' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> & FunctionComponent<{}> & { getInitialProps?(context: NextPageContext): {} | Promise<...>; }'.
Type 'ReactElement<any, any>' is not assignable to type 'FunctionComponent<{}>'.
Type 'ReactElement<any, any>' provides no match for the signature '(props: {}, context?: any): ReactElement<any, any> | null'.ts(2345)
19 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 11/6/2022 in #questions
Per-Page Layouts in T3
The one above is for the MyApp declaration squiggly Line
19 replies
TTCTheo's Typesafe Cult
Created by Mik3y-F on 11/6/2022 in #questions
Per-Page Layouts in T3
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'AppType<{ session: Session | null; }>'.
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'FunctionComponent<AppPropsType<any, { session: Session | null; }>> & { getInitialProps?(context: AppContextType<NextRouter>): { ...; } | Promise<...>; }'.
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'FunctionComponent<AppPropsType<any, { session: Session | null; }>>'.
Type 'string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<{}, any> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'ReactElement<any, any> | null'.
Type 'undefined' is not assignable to type 'ReactElement<any, any> | null'.ts(2322)
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'AppType<{ session: Session | null; }>'.
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'FunctionComponent<AppPropsType<any, { session: Session | null; }>> & { getInitialProps?(context: AppContextType<NextRouter>): { ...; } | Promise<...>; }'.
Type '({ Component, pageProps: { session, ...pageProps }, }: AppPropsWithLayout) => string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<...> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'FunctionComponent<AppPropsType<any, { session: Session | null; }>>'.
Type 'string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | (ComponentClass<{}, any> & { ...; }) | (FunctionComponent<...> & { ...; }) | null | undefined' is not assignable to type 'ReactElement<any, any> | null'.
Type 'undefined' is not assignable to type 'ReactElement<any, any> | null'.ts(2322)
19 replies