- {/* logo */}
+
-
-
-
{title}
- {subtitle &&
{subtitle}
}
-
-
diff --git a/website/src/components/Header.tsx b/website/src/components/Header.tsx
index e2cd7e17..5d80f129 100644
--- a/website/src/components/Header.tsx
+++ b/website/src/components/Header.tsx
@@ -47,7 +47,7 @@ function AccountButton() {
);
}
return (
-
+
);
@@ -61,7 +61,7 @@ export function Header() {
+
diff --git a/website/src/pages/api/auth/[...nextauth].ts b/website/src/pages/api/auth/[...nextauth].ts
index 86d8bdc4..148b620d 100644
--- a/website/src/pages/api/auth/[...nextauth].ts
+++ b/website/src/pages/api/auth/[...nextauth].ts
@@ -37,7 +37,7 @@ export const authOptions: AuthOptions = {
adapter: PrismaAdapter(prisma),
providers,
pages: {
- signIn: "/auth/signin",
+ signIn: "/auth/signup",
},
session: {
strategy: "jwt",
diff --git a/website/src/pages/auth/signin.tsx b/website/src/pages/auth/signin.tsx
deleted file mode 100644
index b9c1d872..00000000
--- a/website/src/pages/auth/signin.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { Button, Input } from "@chakra-ui/react";
-import Head from "next/head";
-import { FaDiscord, FaGithub, FaMagic } from "react-icons/fa";
-import { getCsrfToken, getProviders, signIn } from "next-auth/react";
-import { useRef } from "react";
-
-import { AuthLayout } from "src/components/AuthLayout";
-
-export default function Signin({ csrfToken, providers }) {
- const { discord, email } = providers;
- const emailEl = useRef(null);
- const signinWithEmail = () => {
- signIn(email.id, { callbackUrl: "/", email: emailEl.current.value });
- };
-
- return (
- <>
-
- Log in
-
- >}>
-
- {discord && (
-
}
- colorScheme="blue"
- size="lg"
- w="36"
- onClick={() => signIn(discord.id, { callbackUrl: "/" })}
- >
- Discord
-
- )}
-
-
} colorScheme="blue" size="lg">
- Github
-
-
- {email && (
-
-
- } colorScheme="blue" size="lg" onClick={signinWithEmail}>
- Email
-
-
- )}
-
-
- >
- );
-}
-
-export async function getServerSideProps(context) {
- const csrfToken = await getCsrfToken();
- const providers = await getProviders();
- return {
- props: {
- csrfToken,
- providers,
- },
- };
-}
diff --git a/website/src/pages/auth/signup.tsx b/website/src/pages/auth/signup.tsx
new file mode 100644
index 00000000..e07ebe01
--- /dev/null
+++ b/website/src/pages/auth/signup.tsx
@@ -0,0 +1,92 @@
+import { Box, Button, ButtonGroup, Input, Stack } from "@chakra-ui/react";
+import Head from "next/head";
+import { FaDiscord, FaEnvelope, FaGithub, FaMagic } from "react-icons/fa";
+import { getCsrfToken, getProviders, signIn } from "next-auth/react";
+import { useRef } from "react";
+import Link from "next/link";
+
+import { AuthLayout } from "src/components/AuthLayout";
+
+export default function Signin({ csrfToken, providers }) {
+ const { discord, email } = providers;
+ const emailEl = useRef(null);
+ const signinWithEmail = () => {
+ signIn(email.id, { callbackUrl: "/", email: emailEl.current.value });
+ };
+
+ return (
+ <>
+
+ Sign Up - Open Assistant
+
+
+
+
+ {email && (
+
+
+ }
+ colorScheme="gray"
+ onClick={signinWithEmail}
+ // isDisabled="false"
+ >
+ Continue with Email
+
+
+ )}
+ {/* {discord && ( */}
+ }
+ color="white"
+ // onClick={() => signIn(discord.id, { callbackUrl: "/" })}
+ >
+ Continue with Discord
+
+ {/* )} */}
+ }
+ colorScheme="blue"
+ >
+ Continue with Github
+
+
+
+
+ Already have an account? Log In
+
+
+ >
+ );
+}
+
+export async function getServerSideProps(context) {
+ const csrfToken = await getCsrfToken();
+ const providers = await getProviders();
+ return {
+ props: {
+ csrfToken,
+ providers,
+ },
+ };
+}