diff --git a/apps/hub-server/modules/mail-templates/ConfirmEmail.tsx b/apps/hub-server/modules/mail-templates/ConfirmEmail.tsx index 6030a2fd..c06ac6de 100644 --- a/apps/hub-server/modules/mail-templates/ConfirmEmail.tsx +++ b/apps/hub-server/modules/mail-templates/ConfirmEmail.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import { User } from "@repo/db"; import { Html, render } from "@react-email/components"; +import { EmailFooter } from "./EmailFooter"; const styles = ` * { @@ -183,43 +184,7 @@ const Template = ({ user, code }: { user: User; code: string }) => ( - - - Impressum - - | - - Datenschutzerklärung - - | - - Knowledgebase - - + diff --git a/apps/hub-server/modules/mail-templates/CourseCompleted.tsx b/apps/hub-server/modules/mail-templates/CourseCompleted.tsx index 66fd6d88..e09953da 100644 --- a/apps/hub-server/modules/mail-templates/CourseCompleted.tsx +++ b/apps/hub-server/modules/mail-templates/CourseCompleted.tsx @@ -2,6 +2,7 @@ import * as React from "react"; import { Event, User } from "@repo/db"; import { Html, Button, render } from "@react-email/components"; import { Badge } from "./Badge"; +import { EmailFooter } from "./EmailFooter"; const styles = ` * { @@ -132,43 +133,7 @@ const Template = ({ event, user }: { user: User; event: Event }) => ( - - - Impressum - - | - - Datenschutzerklärung - - | - - Knowledgebase - - + diff --git a/apps/hub-server/modules/mail-templates/EmailFooter.tsx b/apps/hub-server/modules/mail-templates/EmailFooter.tsx new file mode 100644 index 00000000..06d00136 --- /dev/null +++ b/apps/hub-server/modules/mail-templates/EmailFooter.tsx @@ -0,0 +1,41 @@ +export const EmailFooter = () => { + return ( + + + Impressum + + | + + Datenschutzerklärung + + | + + Knowledgebase + + + ); +}; diff --git a/apps/hub-server/modules/mail-templates/PasswordChanged.tsx b/apps/hub-server/modules/mail-templates/PasswordChanged.tsx index 5a7bd4da..ea543935 100644 --- a/apps/hub-server/modules/mail-templates/PasswordChanged.tsx +++ b/apps/hub-server/modules/mail-templates/PasswordChanged.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import { User } from "@repo/db"; import { Html, render } from "@react-email/components"; +import { EmailFooter } from "./EmailFooter"; const styles = ` * { @@ -138,43 +139,7 @@ const Template = ({ user, password }: { user: User; password: string }) => ( - - - Impressum - - | - - Datenschutzerklärung - - | - - Knowledgebase - - + diff --git a/apps/hub-server/tsconfig.json b/apps/hub-server/tsconfig.json index 01d715c1..ac895c2a 100644 --- a/apps/hub-server/tsconfig.json +++ b/apps/hub-server/tsconfig.json @@ -4,7 +4,7 @@ "outDir": "dist", "allowImportingTsExtensions": false, "baseUrl": ".", - "jsx": "react" + "jsx": "react-jsx" }, "include": ["**/*.ts", "./index.ts", "modules/mail-templates/VerificationCode.tsx"], "exclude": ["node_modules", "dist"] diff --git a/apps/hub/app/api/auth/[...nextauth]/auth.ts b/apps/hub/app/api/auth/[...nextauth]/auth.ts index bf2d047b..233e33bf 100644 --- a/apps/hub/app/api/auth/[...nextauth]/auth.ts +++ b/apps/hub/app/api/auth/[...nextauth]/auth.ts @@ -69,15 +69,7 @@ export const options: AuthOptions = { }, }); if (!dbUser) { - return { - ...session, - user: { - name: null, - email: null, - image: null, - }, - expires: new Date().toISOString(), - }; + return null as any; } return { ...session,