chore: fix build

This commit is contained in:
Henry
2024-10-17 22:09:19 +01:00
parent c979b2bb19
commit 5bd03e83f6
5 changed files with 196 additions and 182 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -7,7 +7,7 @@
"export": "email export" "export": "email export"
}, },
"dependencies": { "dependencies": {
"@react-email/components": "0.0.12", "@react-email/components": "^0.0.25",
"react-email": "^1.10.0" "react-email": "^3.0.1"
} }
} }

View File

@@ -1,16 +1,13 @@
import { import { Body } from "@react-email/body";
Body, import { Button } from "@react-email/button";
Button, import { Container } from "@react-email/container";
Container, import { Head } from "@react-email/head";
Head, import { Heading } from "@react-email/heading";
Heading, import { Html } from "@react-email/html";
Html, import { Hr } from "@react-email/hr";
Hr, import { Link } from "@react-email/link";
Link, import { Preview } from "@react-email/preview";
Preview, import { Text } from "@react-email/text";
Tailwind,
Text,
} from "@react-email/components";
import * as React from "react"; import * as React from "react";
@@ -19,73 +16,84 @@ export const JoinWorkspaceTemplate = ({
}: { }: {
magicLoginUrl?: string; magicLoginUrl?: string;
}) => ( }) => (
<Tailwind
config={{
theme: {
extend: {
fontFamily: {
body: [
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Oxygen",
"Ubuntu",
"Cantarell",
"Fira Sans",
"Droid Sans",
"Helvetica Neue",
"sans-serif",
],
},
colors: {
"dark-50": "#161616",
"dark-100": "#1c1c1c",
"dark-200": "#232323",
"dark-300": "#282828",
"dark-400": "#2e2e2e",
"dark-500": "#343434",
"dark-600": "#3e3e3e",
"dark-700": "#505050",
"dark-800": "#707070",
"dark-900": "#7e7e7e",
"dark-950": "#bbb",
"dark-1000": "#ededed",
},
},
},
}}
>
<Html> <Html>
<Head /> <Head />
<Preview>Log in with this magic link</Preview> <Preview>Log in with this magic link</Preview>
<Body className="bg-white"> <Body style={{ backgroundColor: "white" }}>
<Container className="font-body m-auto px-3"> <Container
<Heading className="my-10 text-[24px] font-bold text-dark-200"> style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
margin: "auto",
paddingLeft: "0.75rem",
paddingRight: "0.75rem",
}}
>
<Heading
style={{
marginTop: "2.5rem",
marginBottom: "2.5rem",
fontSize: "24px",
fontWeight: "bold",
color: "#232323",
}}
>
kan.bn kan.bn
</Heading> </Heading>
<Heading className="text-[24px] font-bold text-dark-200"> <Heading
style={{ fontSize: "24px", fontWeight: "bold", color: "#232323" }}
>
Login to your Kan account Login to your Kan account
</Heading> </Heading>
<Text className="font-sm mb-8 text-dark-200"> <Text
style={{
fontSize: "0.875rem",
marginBottom: "2rem",
color: "#232323",
}}
>
Click the button below to instantly login to your account. Click the button below to instantly login to your account.
</Text> </Text>
<Button <Button
target="_blank" target="_blank"
href={magicLoginUrl} href={loginUrl}
className="mb-8 rounded-md bg-dark-300 px-6 py-4 text-sm font-medium leading-4 text-white" style={{
marginBottom: "2rem",
borderRadius: "0.375rem",
backgroundColor: "#282828",
paddingLeft: "1.5rem",
paddingRight: "1.5rem",
paddingTop: "1rem",
paddingBottom: "1rem",
fontSize: "0.875rem",
fontWeight: "500",
lineHeight: "1",
color: "white",
}}
> >
Login to your account Login to your account
</Button> </Button>
<Text className="mb-4 text-sm text-dark-900"> <Text
style={{
marginBottom: "1rem",
fontSize: "0.875rem",
color: "#7e7e7e",
}}
>
If you didn&apos;t try to login, you can safely ignore this email. If you didn&apos;t try to login, you can safely ignore this email.
</Text> </Text>
<Hr className="mb-8 mt-10 border" /> <Hr
<Text className="text-dark-900"> style={{
marginTop: "2.5rem",
marginBottom: "2rem",
borderWidth: "1px",
}}
/>
<Text style={{ color: "#7e7e7e" }}>
<Link <Link
href={process.env.WEBSITE_URL} href={process.env.WEBSITE_URL}
target="_blank" target="_blank"
className="text-dark-900 underline" style={{ color: "#7e7e7e", textDecoration: "underline" }}
> >
Kan Kan
</Link> </Link>
@@ -94,7 +102,6 @@ export const JoinWorkspaceTemplate = ({
</Container> </Container>
</Body> </Body>
</Html> </Html>
</Tailwind>
); );
export default JoinWorkspaceTemplate; export default JoinWorkspaceTemplate;

View File

@@ -1,91 +1,99 @@
import { import { Body } from "@react-email/body";
Body, import { Button } from "@react-email/button";
Button, import { Container } from "@react-email/container";
Container, import { Head } from "@react-email/head";
Head, import { Heading } from "@react-email/heading";
Heading, import { Html } from "@react-email/html";
Html, import { Hr } from "@react-email/hr";
Hr, import { Link } from "@react-email/link";
Link, import { Preview } from "@react-email/preview";
Preview, import { Text } from "@react-email/text";
Tailwind,
Text,
} from "@react-email/components";
import * as React from "react"; import * as React from "react";
interface MagicLinkEmailProps { export const MagicLinkTemplate = ({
loginUrl?: string; magicLoginUrl,
} }: {
magicLoginUrl?: string;
export const MagicLinkTemplate = ({ loginUrl }: MagicLinkEmailProps) => ( }) => (
<Tailwind
config={{
theme: {
extend: {
fontFamily: {
body: [
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Oxygen",
"Ubuntu",
"Cantarell",
"Fira Sans",
"Droid Sans",
"Helvetica Neue",
"sans-serif",
],
},
colors: {
"dark-50": "#161616",
"dark-100": "#1c1c1c",
"dark-200": "#232323",
"dark-300": "#282828",
"dark-400": "#2e2e2e",
"dark-500": "#343434",
"dark-600": "#3e3e3e",
"dark-700": "#505050",
"dark-800": "#707070",
"dark-900": "#7e7e7e",
"dark-950": "#bbb",
"dark-1000": "#ededed",
},
},
},
}}
>
<Html> <Html>
<Head /> <Head />
<Preview>Log in with this magic link</Preview> <Preview>Log in with this magic link</Preview>
<Body className="bg-white"> <Body style={{ backgroundColor: "white" }}>
<Container className="font-body m-auto px-3"> <Container
<Heading className="my-10 text-[24px] font-bold text-dark-200"> style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
margin: "auto",
paddingLeft: "0.75rem",
paddingRight: "0.75rem",
}}
>
<Heading
style={{
marginTop: "2.5rem",
marginBottom: "2.5rem",
fontSize: "24px",
fontWeight: "bold",
color: "#232323",
}}
>
kan.bn kan.bn
</Heading> </Heading>
<Heading className="text-[24px] font-bold text-dark-200"> <Heading
style={{ fontSize: "24px", fontWeight: "bold", color: "#232323" }}
>
Login to your Kan account Login to your Kan account
</Heading> </Heading>
<Text className="font-sm mb-8 text-dark-200"> <Text
style={{
fontSize: "0.875rem",
marginBottom: "2rem",
color: "#232323",
}}
>
Click the button below to instantly login to your account. Click the button below to instantly login to your account.
</Text> </Text>
<Button <Button
target="_blank" target="_blank"
href={loginUrl} href={loginUrl}
className="mb-8 rounded-md bg-dark-300 px-6 py-4 text-sm font-medium leading-4 text-white" style={{
marginBottom: "2rem",
borderRadius: "0.375rem",
backgroundColor: "#282828",
paddingLeft: "1.5rem",
paddingRight: "1.5rem",
paddingTop: "1rem",
paddingBottom: "1rem",
fontSize: "0.875rem",
fontWeight: "500",
lineHeight: "1",
color: "white",
}}
> >
Login to your account Login to your account
</Button> </Button>
<Text className="mb-4 text-sm text-dark-900"> <Text
style={{
marginBottom: "1rem",
fontSize: "0.875rem",
color: "#7e7e7e",
}}
>
If you didn&apos;t try to login, you can safely ignore this email. If you didn&apos;t try to login, you can safely ignore this email.
</Text> </Text>
<Hr className="mb-8 mt-10 border" /> <Hr
<Text className="text-dark-900"> style={{
marginTop: "2.5rem",
marginBottom: "2rem",
borderWidth: "1px",
}}
/>
<Text style={{ color: "#7e7e7e" }}>
<Link <Link
href={process.env.WEBSITE_URL} href={process.env.WEBSITE_URL}
target="_blank" target="_blank"
className="text-dark-900 underline" style={{ color: "#7e7e7e", textDecoration: "underline" }}
> >
Kan Kan
</Link> </Link>
@@ -94,7 +102,6 @@ export const MagicLinkTemplate = ({ loginUrl }: MagicLinkEmailProps) => (
</Container> </Container>
</Body> </Body>
</Html> </Html>
</Tailwind>
); );
export default MagicLinkTemplate; export default MagicLinkTemplate;

View File

@@ -264,7 +264,7 @@ export const cardRouter = createTRPCRouter({
input.cardPublicId, input.cardPublicId,
); );
if (!card ?? !card?.list?.id) if (!card?.list?.id)
throw new TRPCError({ throw new TRPCError({
message: `Card with public ID ${input.cardPublicId} not found`, message: `Card with public ID ${input.cardPublicId} not found`,
code: "NOT_FOUND", code: "NOT_FOUND",