Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions src/app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ export default async function LoginPage() {
</Link>
<p className="text-center text-sm text-zinc-500">
By continuing, you agree to our{" "}
<Link
<a
href={termsUrl}
className="underline hover:text-zinc-900"
target="_blank"
rel="noopener noreferrer"
>
Terms and Conditions
</Link>
</a>
.
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default async function HomePage() {
className="w-full border-highlight/30 hover:bg-highlight/10"
asChild
>
<Link href="/payments">Manage Payments</Link>
<Link href="/payouts">Manage Payments</Link>
</Button>
</CardContent>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -69,7 +70,7 @@ export function InvoiceMeLink({ link, origin }: InvoiceMeLinkProps) {
title="Open link"
>
<Link
href={linkUrl}
href={linkPath}
target="_blank"
rel="noopener noreferrer"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function CreateRecurringPaymentForm() {
const { createRecurringPayment, paymentStatus } = useCreateRecurringPayment({
onSuccess: () => {
setTimeout(() => {
router.push("/payments/recurring");
router.push("/payouts/recurring");
}, 3000);
},
onError: (error) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -166,7 +165,7 @@ export function SubscriptionPlanLink({ plan }: SubscriptionPlanLinkProps) {
className="h-8 w-8 p-0 hover:bg-muted"
title="Open link"
>
<Link href={linkUrl} target="_blank" rel="noopener noreferrer">
<Link href={linkPath} target="_blank" rel="noopener noreferrer">
<ExternalLink className="h-4 w-4 text-muted-foreground" />
</Link>
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default async function NotFound() {

{user ? (
<Link
href="/subscription-plans"
href="/subscriptions"
className="shadow-md group p-6 bg-card rounded-lg border border-border hover:bg-accent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
>
<div className="w-12 h-12 rounded-lg bg-green-100 dark:bg-green-900/30 flex items-center justify-center mx-auto mb-4 group-hover:bg-green-200 dark:group-hover:bg-green-900/50 transition-colors">
Expand Down
12 changes: 6 additions & 6 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ export function Header({ user }: { user?: User | undefined }) {
Ecommerce
</Link>
<Link
href="/invoice-me"
href="/invoices/me"
className="text-foreground hover:text-muted-foreground transition-colors"
>
Invoice Me
</Link>
<Link
href="/subscription-plans"
href="/subscriptions"
className="text-foreground hover:text-muted-foreground transition-colors"
>
Subscription Plans
Expand All @@ -69,14 +69,14 @@ export function Header({ user }: { user?: User | undefined }) {
Crypto-to-fiat
</Link>
{demoMeetingUrl && (
<Link
<a
href={demoMeetingUrl}
className="font-semibold text-foreground underline underline-offset-4 decoration-border hover:text-muted-foreground transition-colors"
target="_blank"
rel="noopener noreferrer"
>
Book A Demo
</Link>
</a>
)}
<UserMenu user={user} />
</>
Expand All @@ -87,13 +87,13 @@ export function Header({ user }: { user?: User | undefined }) {
asChild
className="bg-primary hover:bg-primary/80 text-primary-foreground transition-colors"
>
<Link
<a
href={demoMeetingUrl}
target="_blank"
rel="noopener noreferrer"
>
Book A Demo
</Link>
</a>
</Button>
)}
<ModeToggle />
Expand Down
4 changes: 2 additions & 2 deletions src/components/invoice/invoice-creator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand All @@ -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", {
Expand Down
5 changes: 2 additions & 3 deletions src/components/version-badge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Badge } from "@/components/ui/badge";
import Link from "next/link";
import packageInfo from "../../package.json";

interface VersionDisplayProps {
Expand All @@ -9,11 +8,11 @@ interface VersionDisplayProps {
export default function VersionDisplay({ githubRelease }: VersionDisplayProps) {
return (
<div className="flex m-4 md:m-0 md:fixed md:bottom-4 md:left-4 md:z-10">
<Link target="_blank" href={githubRelease}>
<a target="_blank" href={githubRelease} rel="noopener noreferrer">
<Badge variant="outline" className="text-xs font-mono">
{packageInfo.version}
</Badge>
</Link>
</a>
</div>
);
}