diff --git a/src/cli.tsx b/src/cli.tsx index 0a5e74a..0feb1ed 100644 --- a/src/cli.tsx +++ b/src/cli.tsx @@ -141,5 +141,5 @@ const cli = meow( ); } - successMessage(organization, createdProduct); + successMessage(organization, createdProduct, framework); })(); diff --git a/src/prompts/organization.ts b/src/prompts/organization.ts index 089c097..a2eb622 100644 --- a/src/prompts/organization.ts +++ b/src/prompts/organization.ts @@ -18,14 +18,14 @@ export const selectOrganizationPrompt = async ( organizations: Organization[], matchingOrg?: Organization, ): Promise => { - const { organization: organizationIndex } = await prompts({ + const { organization: orgSlug } = await prompts({ type: "select", name: "organization", message: "Select an organization", choices: [ ...organizations.map((org) => ({ title: org.name, - value: org, + value: org.slug, })), { title: "+ Create new organization", @@ -35,5 +35,5 @@ export const selectOrganizationPrompt = async ( initial: matchingOrg ? organizations.indexOf(matchingOrg) : 0, }); - return organizations[organizationIndex]; + return organizations.find((org) => org.slug === orgSlug); }; diff --git a/src/prompts/product.ts b/src/prompts/product.ts index a477fc7..9c71cae 100644 --- a/src/prompts/product.ts +++ b/src/prompts/product.ts @@ -33,8 +33,7 @@ export const productPrompt = async () => { message: "Price Type", choices: [ { title: "Free", value: "free" }, - { title: "Fixed", value: "fixed" }, - { title: "Custom", value: "custom" }, + { title: "Fixed Price", value: "fixed" }, ], }, { @@ -67,7 +66,7 @@ export const productPrompt = async () => { message: "Price Type", choices: [ { title: "Free", value: "free" }, - { title: "Fixed", value: "fixed" }, + { title: "Fixed Price", value: "fixed" }, ], }, { diff --git a/src/ui/success.tsx b/src/ui/success.tsx index b0947e7..37a13a9 100644 --- a/src/ui/success.tsx +++ b/src/ui/success.tsx @@ -4,10 +4,12 @@ import type { Product } from "@polar-sh/sdk/models/components/product.js"; import { Box, Text, render } from "ink"; import Link from "ink-link"; import React from "react"; +import type { Framework } from "../template.js"; export const successMessage = ( organization: Organization, product: Product, + framework: Framework, ) => { render( @@ -42,12 +44,14 @@ export const successMessage = ( Configure Webhooks - - {">"}{" "} - - Continue to the Polar Next.js Guide - - + {framework === "next" && ( + + {">"}{" "} + + Continue to the Polar Next.js Guide + + + )} , );