shellphone.app/app/auth/pages/welcome.tsx

29 lines
730 B
TypeScript
Raw Normal View History

2021-10-15 22:24:28 +00:00
import type { BlitzPage, GetServerSideProps } from "blitz";
import { getSession, Routes, useRouter } from "blitz";
2021-10-24 20:25:01 +00:00
// TODO: make this page feel more welcoming lol
2021-10-15 22:24:28 +00:00
const Welcome: BlitzPage = () => {
const router = useRouter();
return (
<div>
<p>Thanks for joining Shellphone</p>
<p>Let us know if you need our help</p>
<p>Make sure to set up your phone number</p>
<button onClick={() => router.push(Routes.Messages())}>Open my phone</button>
</div>
);
};
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
const session = await getSession(req, res);
await session.$setPublicData({ shouldShowWelcomeMessage: undefined });
return {
props: {},
};
};
export default Welcome;