Move /payments to /payments/offers-and-items

This commit is contained in:
Konstantin Wohlwend 2025-09-12 14:49:10 -07:00
parent edc68fea58
commit 4de5adb874
12 changed files with 28 additions and 23 deletions

View File

@ -1,6 +1,6 @@
"use client";
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Typography, SimpleTooltip } from "@stackframe/stack-ui";
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, SimpleTooltip, Typography } from "@stackframe/stack-ui";
import { useState } from "react";
type CreateGroupDialogProps = {

View File

@ -11,7 +11,7 @@ import { ConnectNotificationBanner } from "@stripe/react-connect-js";
import { ArrowRight, BarChart3, Repeat, Shield, Wallet, Webhook } from "lucide-react";
import { useState } from "react";
import * as yup from "yup";
import { useAdminApp } from "../use-admin-app";
import { useAdminApp } from "../../use-admin-app";
export default function PaymentsLayout({ children }: { children: React.ReactNode }) {
const [bannerHasItems, setBannerHasItems] = useState(false);

View File

@ -9,9 +9,9 @@ import { stringCompare } from "@stackframe/stack-shared/dist/utils/strings";
import { Button, Card, CardContent, Checkbox, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, toast } from "@stackframe/stack-ui";
import { MoreVertical, Plus } from "lucide-react";
import React, { ReactNode, useEffect, useMemo, useRef, useState } from "react";
import { IllustratedInfo } from "../../../../../../components/illustrated-info";
import { PageLayout } from "../page-layout";
import { useAdminApp } from "../use-admin-app";
import { IllustratedInfo } from "../../../../../../../components/illustrated-info";
import { PageLayout } from "../../page-layout";
import { useAdminApp } from "../../use-admin-app";
import { DUMMY_PAYMENTS_CONFIG } from "./dummy-data";
import { ItemDialog } from "./item-dialog";
import { ListSection } from "./list-section";

View File

@ -0,0 +1,15 @@
import PageClient from "./page-client";
export const metadata = {
title: "Payments",
};
type Params = {
projectId: string,
};
export default async function Page({ params }: { params: Promise<Params> }) {
return (
<PageClient />
);
}

View File

@ -1,15 +1,5 @@
import PageClient from "./page-client";
import { redirect } from "next/navigation";
export const metadata = {
title: "Payments",
};
type Params = {
projectId: string,
};
export default async function Page({ params }: { params: Promise<Params> }) {
return (
<PageClient />
);
export default function Page() {
redirect("./payments/offers-and-items");
}

View File

@ -24,6 +24,7 @@ import {
} from "@stackframe/stack-ui";
import {
Book,
CreditCard,
FilePen,
Globe,
KeyRound,
@ -240,18 +241,17 @@ const navigationItems: (Label | Item | Hidden)[] = [
regex: /^\/projects\/[^\/]+\/email-themes\/[^\/]+$/,
type: 'hidden',
},
/*
{
name: "Payments",
type: 'label',
},
{
name: "Payments",
href: "/payments",
regex: /^\/projects\/[^\/]+\/payments$/,
name: "Offers & Items",
href: "/payments/offers-and-items",
regex: /^\/projects\/[^\/]+\/payments\/offers-and-items$/,
icon: CreditCard,
type: 'item',
},*/
},
{
name: "Configuration",
type: 'label'