GabrielDSFS
GabrielDSFS
Explore posts from servers
TTCTheo's Typesafe Cult
Created by GabrielDSFS on 5/8/2024 in #questions
How to make a fully public page with TRPC requests on T3?
No description
11 replies
TTCTheo's Typesafe Cult
Created by GabrielDSFS on 12/19/2023 in #questions
TRPC request stays as 'paused' and is never run?
Some of my users are having their TRPC requests stay as "paused" indefinitely. I have a T3 app that uses TRPC, and I have some pretty straight forward dashboard UI. This doesn't happen at my machine but happens on some of the user's machines, here's a sample code that is run inside a react hook: console.log("Fetching products!!!"); const products = api.product.getAllWithRelations.useQuery({ includeLocations, includeProcesses, includeManufacturers, }); console.log("Product status:", products); Which the user has it eternally on "isLoading: true" and the fetchStatus is accused as "paused" for some reason? After logging the status, that's what my user sees: data: undefined dataUpdatedAt: 0 error: null errorUpdateCount: 0 errorUpdatedAt: 0 failureCount: 0 failureReason: null **fetchStatus: "paused"** **isError: false** isFetched: false isFetchedAfterMount: false isFetching: false isInitialLoading: false **isLoading: true** isLoadingError: false **isPaused: true** isPlaceholderData: false isPreviousData: false isRefetchError: false isRefetching: false isStale: true isSuccess: false As seen, I'm not pausing the request myself for whatsoever reason. The only special thing I'm doing is running a middleware for sentry and Clerk authorization. const sentryMiddleware = t.middleware( Sentry.Handlers.trpcMiddleware({ attachRpcInput: true, }) ); const enforceUserIsAuthorized = t.middleware(async ({ ctx, next }) => { if (!ctx.currentUser) throw new TRPCError({ code: "UNAUTHORIZED", message: "You need to be authorized to do this.", }); return next({ ctx: { currentUser: ctx.currentUser } }); }); export const privateProcedure = t.procedure .use(sentryMiddleware) .use(enforceUserIsAuthorized);
2 replies
PD🧩 Plasmo Developers
Created by GabrielDSFS on 6/21/2023 in #👟framework
How to keep the content.tsx open (or open again) when navigating to a new page?
I am trying to redirect the user from the content to a new page (for web scraping uses) and I need to open the extension again once the new page is opened.
6 replies
PD🧩 Plasmo Developers
Created by GabrielDSFS on 6/21/2023 in #🔰newbie
Why my extension doesn't update automatically sometimes?
Sometimes I'm writing code and saving it multiple times, then I save it a last time before testing, it says its re-packaged but it's actually behind, so I have to restart the dev server to see the changes.
3 replies
PD🧩 Plasmo Developers
Created by GabrielDSFS on 3/30/2023 in #🔰newbie
How can I not use a Shadow DOM on content?
I need to make it so the content.tsx is fixed to the top of the page (kind of like position-fixed) and push the rest of the open page down, not be "above" it,
3 replies
PD🧩 Plasmo Developers
Created by GabrielDSFS on 3/29/2023 in #🔰newbie
How can I import a font (Roboto) inside content.tsx and keep my style?
I have 2 files: base.css where it only imports the font (from Google API) and style.css where there's all the stylesheet. How can I do both? Seems like I can only do one or the other. I have tried to concatenate like "export const getStyle = () => { const style = document.createElement("style") style.textContent = baseText + styleText return style }" but it doesn't work.
2 replies
PD🧩 Plasmo Developers
Created by GabrielDSFS on 3/21/2023 in #🔰newbie
How can I add Robot font to Plasmo?
Just adding as normal doesn't work.
2 replies