diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx
deleted file mode 100644
index 93779ffc..00000000
--- a/src/app/global-error.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-"use client";
-
-import * as Sentry from "@sentry/nextjs";
-import Error from "next/error";
-import { useEffect } from "react";
-
-export default function GlobalError({ error }: { error: Error }) {
- useEffect(() => {
- Sentry.captureException(error);
- }, [error]);
-
- return (
-
-
-
-
-
- );
-}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
deleted file mode 100644
index 5d06ccb0..00000000
--- a/src/app/layout.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-export const metadata = {
- title: "Reacher - Open Source Email Verification Tool",
- description:
- "Reacher is a fast, accurate and simple email verification tool to reduce your bounce rate and maintain your sender reputation. We check SMTP responses, MX records, catch-all and disposable addresses.",
-};
-
-export default function RootLayout({
- children,
-}: {
- children: React.ReactNode;
-}) {
- return (
-
- {children}
-
- );
-}
diff --git a/src/components/Crisp.tsx b/src/components/Crisp.tsx
index 4aa11c70..3653099f 100644
--- a/src/components/Crisp.tsx
+++ b/src/components/Crisp.tsx
@@ -1,9 +1,19 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
+import { useUser } from "@/util/useUser";
+import { useRouter } from "next/router";
import { useEffect } from "react";
export default function Crisp(): null {
+ const router = useRouter();
+ const { user } = useUser();
+
useEffect(() => {
+ // @ts-expect-error
+ window.CRISP_RUNTIME_CONFIG = {
+ locale: router.locale || "en",
+ };
+
// @ts-ignore
window.$crisp = [];
// @ts-ignore
@@ -18,5 +28,14 @@ export default function Crisp(): null {
})();
}, []);
+ useEffect(() => {
+ if (!user?.email) {
+ return;
+ }
+
+ // @ts-expect-error
+ window.$crisp.push(["set", "user:email", user.email]);
+ }, []);
+
return null;
}
diff --git a/src/components/Head.tsx b/src/components/Head.tsx
deleted file mode 100644
index 09b890f4..00000000
--- a/src/components/Head.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import NextHead from "next/head";
-import React from "react";
-
-export function Head(): React.ReactElement {
- return (
-
-
-
-
-
-
-
- Reacher Dashboard
-
- );
-}
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index 997a16bd..9258c2eb 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -1,8 +1,8 @@
import React, { ReactElement } from "react";
import { Footer } from "./Footer";
-import { Head } from "./Head";
import { Nav } from "./Nav";
+import Head from "next/head";
export interface LayoutProps {
children: React.ReactChild;
@@ -11,7 +11,9 @@ export interface LayoutProps {
export function Layout({ children }: LayoutProps): ReactElement {
return (
<>
-
+
+
Reacher Dashboard
+
{children}
diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx
index 768c2e69..8bdb054c 100644
--- a/src/pages/_document.tsx
+++ b/src/pages/_document.tsx
@@ -2,10 +2,10 @@ import { CssBaseline } from "@geist-ui/react";
import Document, {
DocumentContext,
DocumentInitialProps,
- Head,
Html,
Main,
NextScript,
+ Head,
} from "next/document";
import React from "react";
@@ -30,7 +30,20 @@ export default class MyDocument extends Document {
render(): React.ReactElement {
return (
-
+
+
+
+
+
+
+
+