diff --git a/bun.lockb b/bun.lockb index f98cd33c..ccaa4773 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 0ab6515a..d6f77bbf 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@vercel/postgres": "^0.7.2", "date-fns": "^4.1.0", "drizzle-orm": "^0.28.5", + "js-cookie": "^3.0.5", "next": "^14.1.3", "nextjs-cors": "^2.2.0", "postgres": "^3.4.4", @@ -49,6 +50,7 @@ }, "devDependencies": { "@types/eslint": "^8.56.2", + "@types/js-cookie": "^3.0.6", "@types/node": "^20.11.20", "@types/react": "^18.2.57", "@types/react-beautiful-dnd": "^13.1.7", diff --git a/public/hero.png b/public/hero.png new file mode 100644 index 00000000..0c406376 Binary files /dev/null and b/public/hero.png differ diff --git a/src/env.mjs b/src/env.mjs index c459dd8b..d8a8fc85 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -26,7 +26,7 @@ export const env = createEnv({ * `NEXT_PUBLIC_`. */ client: { - // NEXT_PUBLIC_CLIENTVAR: z.string(), + NEXT_PUBLIC_SUPABASE_AUTH_COOKIE_NAME: z.string(), }, /** @@ -37,7 +37,8 @@ export const env = createEnv({ POSTGRES_URL: process.env.POSTGRES_URL, NODE_ENV: process.env.NODE_ENV, WEBSITE_URL: process.env.WEBSITE_URL, - // NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR, + NEXT_PUBLIC_SUPABASE_AUTH_COOKIE_NAME: + process.env.NEXT_PUBLIC_SUPABASE_AUTH_COOKIE_NAME, }, /** * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially diff --git a/src/views/home/index.tsx b/src/views/home/index.tsx index bdf7912c..e8a6e933 100644 --- a/src/views/home/index.tsx +++ b/src/views/home/index.tsx @@ -1,14 +1,18 @@ import Link from "next/link"; +import Image from "next/image"; +import Cookies from "js-cookie"; + import Button from "~/components/Button"; import PatternedBackground from "~/components/PatternedBackground"; import { api } from "~/utils/api"; +import { env } from "~/env.mjs"; import { IoLogoGithub } from "react-icons/io"; export default function HomeView() { const token = typeof window !== "undefined" - ? localStorage.getItem("sb-bbgbpnfcmvrpinklkgqq-auth-token.0") + ? Cookies.get(env.NEXT_PUBLIC_SUPABASE_AUTH_COOKIE_NAME) : null; const { data } = api.auth.getUser.useQuery(undefined, { @@ -98,7 +102,19 @@ export default function HomeView() {
-We are currently building the product and will be launching