From 79af1b5852f06b140fe9837c7fa3dff0b1ebaabb Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 9 Jan 2023 18:56:19 -0600 Subject: [PATCH] add missing signup file --- pages/signup.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pages/signup.js diff --git a/pages/signup.js b/pages/signup.js new file mode 100644 index 00000000..83379975 --- /dev/null +++ b/pages/signup.js @@ -0,0 +1,51 @@ +import { providers, getSession } from 'next-auth/client' +import Link from 'next/link' +import Login from '../components/login' + +export async function getServerSideProps ({ req, res, query: { callbackUrl, error = null } }) { + const session = await getSession({ req }) + + if (session && res && callbackUrl) { + res.writeHead(302, { + Location: callbackUrl + }) + res.end() + return { props: {} } + } + + return { + props: { + providers: await providers({ req, res }), + callbackUrl, + error + } + } +} + +function SignUpHeader () { + return ( + <> +

+ Sign up +

+
Join 9000+ bitcoiners and start stacking sats today
+ + ) +} + +function SignUpFooter ({ callbackUrl }) { + return ( + Already have an account? login + ) +} + +export default function SignUp ({ ...props }) { + return ( + } + Footer={() => } + text='Sign up' + {...props} + /> + ) +}