.snkt
.snkt
Explore posts from servers
PD🧩 Plasmo Developers
Created by .snkt on 6/18/2023 in #🔰newbie
Is there a way to talk between content CUI scripts?
I have some buttons on the screen and I want to create a popup to show status is that possible when I click on the button popup gets open? (overlay) or is there something so I can open overlay within same component using absolute css position as right now using absolute it's just puts within the component.
12 replies
PD🧩 Plasmo Developers
Created by .snkt on 6/15/2023 in #🔰newbie
When using getOverlayAnchorList. how to get the id of the parent element?
When using getOverlayAnchorList. how to get the index of element?
9 replies
TTCTheo's Typesafe Cult
Created by .snkt on 5/15/2023 in #questions
How to redirect using TRPC?
I am generating stripe checkout url from trpc endpoint and want to redirect user to that page. Here is what I am doing right now
export const purchaseRouter = createTRPCRouter({
getUrl: publicProcedure
.input(z.object({ text: z.string() }))
.query(async ({ input, ctx }) => {
const host = ctx.req.headers.host;
if (!host) {
throw new Error("No host");
}
const session = await stripe.checkout.sessions.create({
line_items: [
{
price: "price_1N7vQ8CxIhQOHpG7clowFgAm",
quantity: 1,
},
],
mode: "payment",
success_url: `https://${host}/?success=true`,
cancel_url: `https://${host}/?canceled=true`,
});
ctx.res.redirect(303, session.url);
}),
});
export const purchaseRouter = createTRPCRouter({
getUrl: publicProcedure
.input(z.object({ text: z.string() }))
.query(async ({ input, ctx }) => {
const host = ctx.req.headers.host;
if (!host) {
throw new Error("No host");
}
const session = await stripe.checkout.sessions.create({
line_items: [
{
price: "price_1N7vQ8CxIhQOHpG7clowFgAm",
quantity: 1,
},
],
mode: "payment",
success_url: `https://${host}/?success=true`,
cancel_url: `https://${host}/?canceled=true`,
});
ctx.res.redirect(303, session.url);
}),
});
6 replies
TTCTheo's Typesafe Cult
Created by .snkt on 4/29/2023 in #questions
Is it possible to deploy t3 app on firebase?
I have specific requirement of running the serverless function for more than 5 minutes. and vercel does not support it. where as firebase provides max timeout of 60 min. which is perfectly suitable for me. Greatly appreciate any other suggestion?
7 replies
TTCTheo's Typesafe Cult
Created by .snkt on 3/7/2023 in #questions
How to fix "Invalid environment variables"
29 replies
TTCTheo's Typesafe Cult
Created by .snkt on 3/4/2023 in #questions
How to call useQuery conditionally?
18 replies