fix: checkout
This commit is contained in:
@@ -27,7 +27,6 @@ const paramsSchema = z.object({
|
||||
|
||||
const metadataSchema = z.object({
|
||||
organizationId: z.string(),
|
||||
projectId: z.string(),
|
||||
integrationId: z.string(),
|
||||
});
|
||||
|
||||
@@ -89,7 +88,7 @@ export async function slackWebhook(
|
||||
'👋 Hello. You have successfully connected OpenPanel.dev to your Slack workspace.',
|
||||
});
|
||||
|
||||
const { projectId, organizationId, integrationId } = parsedMetadata.data;
|
||||
const { organizationId, integrationId } = parsedMetadata.data;
|
||||
|
||||
await db.integration.update({
|
||||
where: {
|
||||
@@ -105,7 +104,7 @@ export async function slackWebhook(
|
||||
});
|
||||
|
||||
return reply.redirect(
|
||||
`${process.env.DASHBOARD_URL || process.env.NEXT_PUBLIC_DASHBOARD_URL}/${organizationId}/${projectId}/settings/integrations?tab=installed`,
|
||||
`${process.env.DASHBOARD_URL || process.env.NEXT_PUBLIC_DASHBOARD_URL}/${organizationId}/integrations/installed`,
|
||||
);
|
||||
} catch (err) {
|
||||
request.log.error(err);
|
||||
|
||||
@@ -29,7 +29,6 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function Billing({ organization }: Props) {
|
||||
const { projectId } = useAppParams();
|
||||
const queryClient = useQueryClient();
|
||||
const trpc = useTRPC();
|
||||
const [customerSessionToken, setCustomerSessionToken] = useQueryState(
|
||||
@@ -271,7 +270,6 @@ export default function Billing({ organization }: Props) {
|
||||
key={selectedProduct.prices[0].id}
|
||||
price={selectedProduct.prices[0]}
|
||||
organization={organization}
|
||||
projectId={projectId}
|
||||
buttonText={
|
||||
isUpgrade
|
||||
? 'Upgrade'
|
||||
@@ -350,13 +348,11 @@ export default function Billing({ organization }: Props) {
|
||||
function CheckoutButton({
|
||||
price,
|
||||
organization,
|
||||
projectId,
|
||||
disabled,
|
||||
buttonText,
|
||||
}: {
|
||||
price: IPolarPrice;
|
||||
organization: IServiceOrganization;
|
||||
projectId: string;
|
||||
disabled?: string | null;
|
||||
buttonText?: string;
|
||||
}) {
|
||||
@@ -396,7 +392,6 @@ function CheckoutButton({
|
||||
onClick={() => {
|
||||
const createCheckout = () =>
|
||||
checkout.mutate({
|
||||
projectId,
|
||||
organizationId: organization.id,
|
||||
productPriceId: price!.id,
|
||||
productId: price.productId,
|
||||
|
||||
Reference in New Issue
Block a user