diff --git a/next/branch-sdk-sample-nextjs-all-pages/.eslintrc.json b/next/branch-sdk-sample-nextjs-all-pages/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/next/branch-sdk-sample-nextjs-all-pages/.gitignore b/next/branch-sdk-sample-nextjs-all-pages/.gitignore new file mode 100644 index 0000000..fd3dbb5 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/next/branch-sdk-sample-nextjs-all-pages/README.md b/next/branch-sdk-sample-nextjs-all-pages/README.md new file mode 100644 index 0000000..c403366 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/next/branch-sdk-sample-nextjs-all-pages/app/app.css b/next/branch-sdk-sample-nextjs-all-pages/app/app.css new file mode 100644 index 0000000..e69de29 diff --git a/next/branch-sdk-sample-nextjs-all-pages/app/favicon.ico b/next/branch-sdk-sample-nextjs-all-pages/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/next/branch-sdk-sample-nextjs-all-pages/app/favicon.ico differ diff --git a/next/branch-sdk-sample-nextjs-all-pages/app/globals.css b/next/branch-sdk-sample-nextjs-all-pages/app/globals.css new file mode 100644 index 0000000..6a75725 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/app/globals.css @@ -0,0 +1,76 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 212.7 26.8% 83.9%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} \ No newline at end of file diff --git a/next/branch-sdk-sample-nextjs-all-pages/app/init/page.tsx b/next/branch-sdk-sample-nextjs-all-pages/app/init/page.tsx new file mode 100644 index 0000000..11b9984 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/app/init/page.tsx @@ -0,0 +1,3 @@ +export default function Page() { + return

Init Page

; + } \ No newline at end of file diff --git a/next/branch-sdk-sample-nextjs-all-pages/app/layout.tsx b/next/branch-sdk-sample-nextjs-all-pages/app/layout.tsx new file mode 100644 index 0000000..1af38b1 --- /dev/null +++ b/next/branch-sdk-sample-nextjs-all-pages/app/layout.tsx @@ -0,0 +1,42 @@ +import type { Metadata } from 'next' +import Script from 'next/script' +import { Inter as FontSans } from 'next/font/google' +import { cn } from '../lib/utils' +import './globals.css' + +export const fontSans = FontSans({ + subsets: ["latin"], + variable: "--font-sans", +}) + +export const metadata: Metadata = { + title: 'Branch web sdk example', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + +