Skip to content

Commit

Permalink
chore(web): Rename Examples to Templates (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmfern authored Sep 9, 2024
1 parent 85af3b3 commit 6b12e0a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ module.exports = {
destination: "https://discord.com/invite/n2pWEjjNnD",
permanent: true,
},
{
source: "/examples",
destination: "/templates",
permanent: true,
},
];
},
async rewrites() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Metadata } from "next";
import Image from "next/image";
import { Anchor } from "../../components/anchor";
import { Example } from "../../components/example";
import { Template } from "../../components/template";
import { Heading } from "../../components/heading";
import { Text } from "../../components/text";
import PageTransition from "../../components/page-transition";
Expand Down Expand Up @@ -104,7 +104,7 @@ const items = [
},
];

const title = "Examples — React Email";
const title = "Templates — React Email";
const description = "Open source templates built with React Email";
export const metadata: Metadata = {
title,
Expand All @@ -115,7 +115,7 @@ export const metadata: Metadata = {
},
};

const Examples = () => (
const Templates = () => (
<>
<Image
alt=""
Expand All @@ -131,7 +131,7 @@ const Examples = () => (
>
<div className="mb-12 text-pretty px-6 md:max-w-[46rem] md:px-0 md:text-center">
<Heading className="text-white" size="6">
Examples
Templates
</Heading>
<Text as="p" className="mt-4 text-slate-11" size="2">
{description}.
Expand All @@ -156,11 +156,11 @@ const Examples = () => (
</div>
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
{items.map((item) => (
<Example key={item.path} {...item} />
<Template key={item.path} {...item} />
))}
</div>
</PageTransition>
</>
);

export default Examples;
export default Templates;
2 changes: 1 addition & 1 deletion apps/web/src/components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const MenuItems = ({ onItemClick }: { onItemClick: () => void }) => (
href="/examples"
onClick={onItemClick}
>
Examples
Templates
</MenuItem>
<MenuItem
className="w-full px-2 md:w-fit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const imageLoader: ImageLoader = ({ src, width, quality }) => {
return `${src}?w=${width}&q=${quality || 75}`;
};

export const Example: React.FC<Readonly<ExampleProps>> = ({
export const Template: React.FC<Readonly<ExampleProps>> = ({
className,
path,
name,
Expand Down

1 comment on commit 6b12e0a

@vercel
Copy link

@vercel vercel bot commented on 6b12e0a Sep 9, 2024

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:

react-email-demo – ./apps/demo

react-email-demo-git-main-resend.vercel.app
react-email-demo-resend.vercel.app
demo.react.email
react-email-demo.vercel.app

Please sign in to comment.