Skip to content

Commit ed42324

Browse files
authored
refactor!:stripe connect and stripe payment routing (#7)
1 parent b1f83a6 commit ed42324

File tree

29 files changed

+1724
-231
lines changed

29 files changed

+1724
-231
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"@types/react-dom": "^18",
2626
"@types/react-syntax-highlighter": "^15.5.11",
2727
"autoprefixer": "^10.0.1",
28+
"eslint": "8.57.0",
29+
"eslint-config-next": "14.1.0",
2830
"postcss": "^8",
2931
"rome": "^12.1.3",
3032
"tailwindcss": "^3.3.0",

src/app/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Inter } from "next/font/google";
33
import "./globals.css";
44
import ApplicationKernel from "~/core/ApplicationKernel";
55
import Header from "~/app/views/Header/Header";
6-
import Aside from "~/app/views/Aside";
76

87
const inter = Inter({ subsets: ["latin"] });
98

@@ -23,10 +22,7 @@ export default function RootLayout({
2322
<ApplicationKernel>
2423
<Header />
2524
<div className="flex justify-center w-full">
26-
<div className="grid grid-cols-[256px_1fr_256px] max-w-[1280px] px-6 w-full">
27-
<Aside />
28-
{children}
29-
</div>
25+
<div className="max-w-[1280px] px-6 w-full">{children}</div>
3026
</div>
3127
</ApplicationKernel>
3228
</body>

src/app/page.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Image from "next/image";
22

33
export default function Home() {
44
return (
5-
<main className="flex min-h-screen flex-col items-center justify-between p-24">
5+
<main className="flex h-[calc(100dvh-64px)] flex-col items-center justify-between p-24">
66
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
77
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
88
Get started by editing&nbsp;
@@ -46,13 +46,13 @@ export default function Home() {
4646
target="_blank"
4747
rel="noopener noreferrer"
4848
>
49-
<h2 className={`mb-3 text-2xl font-semibold`}>
49+
<h2 className={"mb-3 text-2xl font-semibold"}>
5050
Docs{" "}
5151
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
5252
-&gt;
5353
</span>
5454
</h2>
55-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
55+
<p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
5656
Find in-depth information about Next.js features and API.
5757
</p>
5858
</a>
@@ -63,13 +63,13 @@ export default function Home() {
6363
target="_blank"
6464
rel="noopener noreferrer"
6565
>
66-
<h2 className={`mb-3 text-2xl font-semibold`}>
66+
<h2 className={"mb-3 text-2xl font-semibold"}>
6767
Learn{" "}
6868
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
6969
-&gt;
7070
</span>
7171
</h2>
72-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
72+
<p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
7373
Learn about Next.js in an interactive course with&nbsp;quizzes!
7474
</p>
7575
</a>
@@ -80,15 +80,13 @@ export default function Home() {
8080
target="_blank"
8181
rel="noopener noreferrer"
8282
>
83-
<h2 className={`mb-3 text-2xl font-semibold`}>
83+
<h2 className={"mb-3 text-2xl font-semibold"}>
8484
Templates{" "}
8585
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
8686
-&gt;
8787
</span>
8888
</h2>
89-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
90-
Explore starter templates for Next.js.
91-
</p>
89+
<p className={"m-0 max-w-[30ch] text-sm opacity-50"}>Explore starter templates for Next.js.</p>
9290
</a>
9391

9492
<a
@@ -97,13 +95,13 @@ export default function Home() {
9795
target="_blank"
9896
rel="noopener noreferrer"
9997
>
100-
<h2 className={`mb-3 text-2xl font-semibold`}>
98+
<h2 className={"mb-3 text-2xl font-semibold"}>
10199
Deploy{" "}
102100
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
103101
-&gt;
104102
</span>
105103
</h2>
106-
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
104+
<p className={"m-0 max-w-[30ch] text-sm opacity-50 text-balance"}>
107105
Instantly deploy your Next.js site to a shareable URL with Vercel.
108106
</p>
109107
</a>

src/app/stripe-connect/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import PageContainer from "~/components/PageContainer/PageContainer";
2+
3+
const StripeConnectPage = () => {
4+
return (
5+
<PageContainer>
6+
<h1>Stripe Connect doc page</h1>
7+
</PageContainer>
8+
);
9+
};
10+
11+
export default StripeConnectPage;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import PageContainer from "~/components/PageContainer/PageContainer";
2+
3+
const StripePaymentCustomerCreatePage = () => {
4+
return (
5+
<PageContainer>
6+
<h1 className="font-bold text-4xl">Create customer</h1>
7+
</PageContainer>
8+
);
9+
};
10+
11+
export default StripePaymentCustomerCreatePage;
File renamed without changes.

src/app/stripe-payment/layout.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ReactNode } from "react";
2+
import Aside from "~/app/stripe-payment/views/Aside";
3+
4+
export interface LayoutProps {
5+
children: ReactNode;
6+
}
7+
8+
const Layout = ({ children }: LayoutProps) => {
9+
return (
10+
<div className="grid grid-cols-[256px_1fr_256px]">
11+
<Aside />
12+
{children}
13+
</div>
14+
);
15+
};
16+
17+
export default Layout;

src/app/(stripe)/add-payment-methods/page.tsx renamed to src/app/stripe-payment/payment-methods/create/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Button, Divider, Link } from "@nextui-org/react";
22
import { cookies } from "next/headers";
3-
import AddPaymentMethods from "~/app/(stripe)/add-payment-methods/views";
43
import getClient from "~/app/api/getClient";
5-
import Chapter from "~/app/views/Chapter/Chapter";
64
import PageContainer from "~/components/PageContainer/PageContainer";
75
import ElementsProvider from "~/libraries/stripe/ElementsProvider";
86
import onDark from "react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus";
97
import { Prism } from "react-syntax-highlighter";
8+
import AddPaymentMethods from "~/app/stripe-payment/payment-methods/create/views";
9+
import Chapter from "~/app/stripe-payment/views/Chapter/Chapter";
1010

1111
const AddPaymentMethodPage = async () => {
1212
const clientId = await getClient(cookies().get("clientId")?.value);

0 commit comments

Comments
 (0)