diff --git a/next.config.mjs b/next.config.mjs index 48439d4c..9d304e33 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -7,6 +7,10 @@ if (process.env.SKIP_ENV_VALIDATION !== "true") { } /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + experimental: { + typedRoutes: true, + }, +}; export default nextConfig; diff --git a/src/app/(auth)/signin/page.tsx b/src/app/(auth)/signin/page.tsx index 44169beb..ac83459a 100644 --- a/src/app/(auth)/signin/page.tsx +++ b/src/app/(auth)/signin/page.tsx @@ -55,14 +55,14 @@ export default async function LoginPage() {

By continuing, you agree to our{" "} - Terms and Conditions - + .

diff --git a/src/app/(dashboard)/home/page.tsx b/src/app/(dashboard)/home/page.tsx index 5e5ae65b..ea6337de 100644 --- a/src/app/(dashboard)/home/page.tsx +++ b/src/app/(dashboard)/home/page.tsx @@ -152,7 +152,7 @@ export default async function HomePage() { className="w-full border-highlight/30 hover:bg-highlight/10" asChild > - Manage Payments + Manage Payments diff --git a/src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx b/src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx index d6e436bb..e33e1ac6 100644 --- a/src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx +++ b/src/app/(dashboard)/invoices/me/_components/invoice-me-link.tsx @@ -34,7 +34,8 @@ export function InvoiceMeLink({ link, origin }: InvoiceMeLinkProps) { }, ); - const linkUrl = `${origin}/i/${link.id}`; + const linkPath = `/i/${link.id}` as const; + const linkUrl = `${origin}${linkPath}`; const copyLink = (url: string) => { navigator.clipboard.writeText(url); @@ -69,7 +70,7 @@ export function InvoiceMeLink({ link, origin }: InvoiceMeLinkProps) { title="Open link" > diff --git a/src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx b/src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx index 78a4ab28..0b7e1fa9 100644 --- a/src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx +++ b/src/app/(dashboard)/payouts/recurring/create/_components/blocks/create-recurring-payment-form.tsx @@ -63,7 +63,7 @@ export function CreateRecurringPaymentForm() { const { createRecurringPayment, paymentStatus } = useCreateRecurringPayment({ onSuccess: () => { setTimeout(() => { - router.push("/payments/recurring"); + router.push("/payouts/recurring"); }, 3000); }, onError: (error) => { diff --git a/src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx b/src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx index a8e6c11a..c60cfbca 100644 --- a/src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx +++ b/src/app/(dashboard)/subscriptions/_components/subscription-plan-link.tsx @@ -67,9 +67,8 @@ export function SubscriptionPlanLink({ plan }: SubscriptionPlanLinkProps) { BigNumber.from(totalNumberOfSubscribers.toString()), ); - const linkUrl = mounted - ? `${window.location.origin}/s/${plan.id}` - : `/s/${plan.id}`; + const linkPath = `/s/${plan.id}` as const; + const linkUrl = mounted ? `${window.location.origin}${linkPath}` : linkPath; const copyLink = (url: string) => { navigator.clipboard @@ -166,7 +165,7 @@ export function SubscriptionPlanLink({ plan }: SubscriptionPlanLinkProps) { className="h-8 w-8 p-0 hover:bg-muted" title="Open link" > - + diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index d2b8af68..49508c21 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -75,7 +75,7 @@ export default async function NotFound() { {user ? (
diff --git a/src/components/header.tsx b/src/components/header.tsx index be3fd693..c5a09e0d 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -51,13 +51,13 @@ export function Header({ user }: { user?: User | undefined }) { Ecommerce Invoice Me Subscription Plans @@ -69,14 +69,14 @@ export function Header({ user }: { user?: User | undefined }) { Crypto-to-fiat {demoMeetingUrl && ( - Book A Demo - + )} @@ -87,13 +87,13 @@ export function Header({ user }: { user?: User | undefined }) { asChild className="bg-primary hover:bg-primary/80 text-primary-foreground transition-colors" > - Book A Demo - + )} diff --git a/src/components/invoice/invoice-creator.tsx b/src/components/invoice/invoice-creator.tsx index eb290135..93e1bcd9 100644 --- a/src/components/invoice/invoice-creator.tsx +++ b/src/components/invoice/invoice-creator.tsx @@ -49,7 +49,7 @@ export function InvoiceCreator({ } toast.success("Invoice created successfully"); await utils.invoice.getAll.invalidate(); - router.push("/dashboard"); + router.push("/invoices"); }, onError: (error) => { toast.error("Failed to create invoice", { @@ -64,7 +64,7 @@ export function InvoiceCreator({ onSuccess: async () => { toast.success("Invoice created successfully"); await utils.invoice.getAll.invalidate(); - router.push("/dashboard"); + router.push("/invoices"); }, onError: (error) => { toast.error("Failed to create invoice", { diff --git a/src/components/version-badge.tsx b/src/components/version-badge.tsx index aa406e41..1ec8758e 100644 --- a/src/components/version-badge.tsx +++ b/src/components/version-badge.tsx @@ -1,5 +1,4 @@ import { Badge } from "@/components/ui/badge"; -import Link from "next/link"; import packageInfo from "../../package.json"; interface VersionDisplayProps { @@ -9,11 +8,11 @@ interface VersionDisplayProps { export default function VersionDisplay({ githubRelease }: VersionDisplayProps) { return (
- + {packageInfo.version} - +
); }