-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update app directory examples to use the new examples UI (#749)
### Description Updated the app directory examples that were duplicating components from the `@vercel/examples-ui` library to the latest version of the library. Also updated the plop template and replaced all options with a default Next.js template, we can later extend it with svelte and more. ### Demo URL <!-- Provide a URL to a live deployment where we can test your PR. If a demo isn't possible feel free to omit this section. --> ### Type of Change - [ ] New Example - [x] Example updates (Bug fixes, new features, etc.) - [x] Other (changes to the codebase, but not to examples) ### New Example Checklist - [ ] 🛫 `npm run new-example` was used to create the example - [ ] 📚 The template wasn't used but I carefuly read the [Adding a new example](https://github.com/vercel/examples#adding-a-new-example) steps and implemented them in the example - [ ] 📱 Is it responsive? Are mobile and tablets considered?
- Loading branch information
Showing
53 changed files
with
6,353 additions
and
5,564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,19 @@ | ||
import type { FC, ReactNode } from 'react' | ||
import Nav from '@vercel/examples-ui/nav' | ||
import Vercel from '@vercel/examples-ui/icons/vercel' | ||
import type { ReactNode } from 'react' | ||
import { Layout, getMetadata } from '@vercel/examples-ui' | ||
import '@vercel/examples-ui/globals.css' | ||
|
||
const RootLayout: FC<{ children: ReactNode }> = ({ children }) => ( | ||
<html> | ||
<body> | ||
<div className="mx-auto h-screen flex flex-col"> | ||
<Nav path="app-directory/css-in-js" /> | ||
<div className="px-8 bg-accents-0"> | ||
<main>{children}</main> | ||
<footer className="py-10 w-full mt-auto border-t flex items-center justify-center bg-accents-1 z-20"> | ||
<span className="text-primary">Created by</span> | ||
<a | ||
href="https://vercel.com" | ||
aria-label="Vercel.com Link" | ||
target="_blank" | ||
rel="noreferrer" | ||
className="text-black" | ||
> | ||
<Vercel | ||
className="inline-block h-6 ml-3 text-primary" | ||
alt="Vercel.com Logo" | ||
/> | ||
</a> | ||
</footer> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
) | ||
export const metadata = getMetadata({ | ||
title: 'CSS-in-JS libraries in the app directory', | ||
description: | ||
'Learn how to use CSS-in-JS libraries in the Next.js app directory.', | ||
}) | ||
|
||
export default RootLayout | ||
export default function RootLayout({ children }: { children: ReactNode }) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
<Layout path="app-directory/css-in-js">{children}</Layout> | ||
</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-flask – ./python/nextjs-flask
next-flask-git-main-vercel-labs.vercel.app
nextjs-python.vercel.app
nextjs-flask-starter.vercel.app
next-flask-vercel-labs.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
edge-functions-feature-flag-split – ./edge-middleware/feature-flag-split
edge-functions-feature-flag-split-git-main-now-examples.vercel.app
feature-flags-split.vercel.app
edge-functions-feature-flag-split.vercel.app
edge-functions-feature-flag-split-now-examples.vercel.app
ab-testing-split.vercel.app
edge-functions-feature-flag-split.vercel.sh
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mint-nft – ./solutions/mint-nft
mint-nft-git-main-vercel-solutions-vtest314.vercel.app
mint-nft-vercel-solutions-vtest314.vercel.app
solutions-mint-nft.vercel.app
mint-nft-kappa.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
postgres-pgvector – ./storage/postgres-pgvector
postgres-pgvector.vercel.app
postgres-pgvector-vercel-labs.vercel.app
postgres-pgvector-git-main-vercel-labs.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
edge-functions-news – ./starter/next-news
edge-functions-next-news.vercel.sh
edge-functions-news-git-main-now-examples.vercel.app
edge-functions-news-now-examples.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
solutions-on-demand-isr – ./solutions/on-demand-isr
solutions-on-demand-isr.vercel.app
solutions-on-demand-isr-now-examples.vercel.app
solutions-on-demand-isr-git-main-now-examples.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
feature-flag-launchdarkly – ./edge-middleware/feature-flag-launchdarkly
feature-flag-launchdarkly-now-examples.vercel.app
feature-flag-launchdarkly.vercel.app
feature-flag-launchdarkly-git-main-now-examples.vercel.app
3ba01f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
edge-ab-testing-statsig – ./edge-middleware/ab-testing-statsig
edge-ab-testing-statsig-git-main-now-examples.vercel.app
edge-ab-testing-statsig-now-examples.vercel.app
edge-ab-testing-statsig.vercel.app
edge-ab-testing-statsig.vercel.sh