diff --git a/bun.lockb b/bun.lockb index 4d5b5fa9..6c057317 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/drizzle/0000_ambiguous_silvermane.sql b/drizzle/0000_ambiguous_silvermane.sql deleted file mode 100644 index 32c2fc96..00000000 --- a/drizzle/0000_ambiguous_silvermane.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE IF NOT EXISTS "early_access" ( - "id" uuid DEFAULT gen_random_uuid(), - "name" text NOT NULL, - "email" text NOT NULL, - "reason" text NOT NULL, - "approved" boolean DEFAULT false, - "created_at" timestamp DEFAULT now(), - "invitation_sent_at" timestamp -); diff --git a/drizzle/0000_funny_johnny_blaze.sql b/drizzle/0000_funny_johnny_blaze.sql new file mode 100644 index 00000000..c1136a57 --- /dev/null +++ b/drizzle/0000_funny_johnny_blaze.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS "early_access" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" text NOT NULL, + "email" text NOT NULL, + "reason" text NOT NULL, + "approved" boolean DEFAULT false, + "created_at" timestamp (3) DEFAULT now(), + "invitation_sent_at" timestamp (3), + CONSTRAINT "early_access_email_unique" UNIQUE("email") +); diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index ffb49cdd..55b95007 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "e593e999-76e0-41ff-bbf3-873b4eafe935", + "id": "b304d26a-1927-40c9-9067-57935d6d9ab3", "prevId": "00000000-0000-0000-0000-000000000000", "version": "6", "dialect": "postgresql", @@ -11,8 +11,8 @@ "id": { "name": "id", "type": "uuid", - "primaryKey": false, - "notNull": false, + "primaryKey": true, + "notNull": true, "default": "gen_random_uuid()" }, "name": { @@ -42,14 +42,14 @@ }, "created_at": { "name": "created_at", - "type": "timestamp", + "type": "timestamp (3)", "primaryKey": false, "notNull": false, "default": "now()" }, "invitation_sent_at": { "name": "invitation_sent_at", - "type": "timestamp", + "type": "timestamp (3)", "primaryKey": false, "notNull": false } @@ -57,7 +57,13 @@ "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "early_access_email_unique": { + "name": "early_access_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + } } }, "enums": {}, diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index c080d092..1768128c 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "6", - "when": 1716662445965, - "tag": "0000_ambiguous_silvermane", + "when": 1716742272276, + "tag": "0000_funny_johnny_blaze", "breakpoints": true } ] diff --git a/public/_static/light-dashboard-preview.jpg b/public/_static/light-dashboard-preview.jpg deleted file mode 100644 index cab831a1..00000000 Binary files a/public/_static/light-dashboard-preview.jpg and /dev/null differ diff --git a/src/app/(marketing)/_components/home-preview.tsx b/src/app/(marketing)/_components/home-preview.tsx deleted file mode 100644 index 5059bcc3..00000000 --- a/src/app/(marketing)/_components/home-preview.tsx +++ /dev/null @@ -1,43 +0,0 @@ -'use client'; - -import { useEffect, useState } from 'react'; -import { useTheme } from 'next-themes'; -import Image from 'next/image'; - -/** - * This component renders the dashboard preview image that is used on the home - * marketing page, it will use the light or dark image depending on the theme. - * @returns A react component representing the dashboard preview image. - */ -export function HomePreview() { - const [mounted, setMounted] = useState(false); - const { resolvedTheme } = useTheme(); - - useEffect(() => { - setMounted(true); - }, []); - - if (mounted && resolvedTheme === 'light') { - return ( - <> - Dashboard Preview - - ); - } - - return ( - Dashboard Preview - ); -} diff --git a/src/app/(marketing)/_components/navbar.tsx b/src/app/(marketing)/_components/navbar.tsx index 16cf991e..83cb5fb5 100644 --- a/src/app/(marketing)/_components/navbar.tsx +++ b/src/app/(marketing)/_components/navbar.tsx @@ -71,7 +71,7 @@ const ListItem = forwardRef< {
  • -

    +

    {constants.tagline}

    @@ -36,7 +36,13 @@ export default function Home() { Get early access - + Dashboard Preview ); } diff --git a/src/app/globals.css b/src/app/globals.css index 75dc60b6..395cad8d 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,5 +1,4 @@ -:root, -html.light { +:root { --gray-1: 0 0% 99%; --gray-2: 0 0% 98%; --gray-3: 0 0% 94%; @@ -66,8 +65,7 @@ html.light { --red-12: 8, 50%, 24%; } -:root, -html.dark { +:root.dark { --gray-1: 0 0% 7%; --gray-2: 0 0% 10%; --gray-3: 0 0% 13%; diff --git a/src/db/schema/early-access.ts b/src/db/schema/early-access.ts index 6d88850b..c8f79aad 100644 --- a/src/db/schema/early-access.ts +++ b/src/db/schema/early-access.ts @@ -2,16 +2,25 @@ import { boolean, pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core'; import { createInsertSchema } from 'drizzle-zod'; export const earlyAccessTable = pgTable('early_access', { - id: uuid('id').defaultRandom(), + id: uuid('id').primaryKey().defaultRandom(), name: text('name').notNull(), - email: text('email').notNull(), + email: text('email').notNull().unique(), reason: text('reason', { enum: ['student', 'project', 'both'] }).notNull(), approved: boolean('approved').default(false), - createdAt: timestamp('created_at', { mode: 'date' }).defaultNow(), - invitationSentAt: timestamp('invitation_sent_at', { mode: 'date' }), + createdAt: timestamp('created_at', { + mode: 'date', + precision: 3, + }).defaultNow(), + invitationSentAt: timestamp('invitation_sent_at', { + mode: 'date', + precision: 3, + }), }); -export const insertEarlyAccess = createInsertSchema(earlyAccessTable).omit({ - id: true, - createdAt: true, +export const insertEarlyAccessSchema = createInsertSchema( + earlyAccessTable, +).pick({ + email: true, + name: true, + reason: true, }); diff --git a/src/emails/templates/early-access-joined.tsx b/src/emails/templates/early-access-joined.tsx index b44f96d5..da5724b1 100644 --- a/src/emails/templates/early-access-joined.tsx +++ b/src/emails/templates/early-access-joined.tsx @@ -4,15 +4,15 @@ import { emailBaseUrl } from '../utils'; import { constants } from '@/constants'; interface Props { - firstName: string; + name: string; email: string; } -export default function EarlyAccessJoinedEmail({ firstName, email }: Props) { +export default function EarlyAccessJoinedEmail({ name, email }: Props) { return ( - Hey {firstName}, Ahmed here, founder and creator of Noodle. + Hey {name}, Ahmed here, founder and creator of Noodle. - I wanted to personally thank you for joining Noodle's early access - list. I am super excited to have you on board and can't wait for - you to start using Noodle. + I wanted to thank you for joining Noodle's early access list. I am + super excited to have you on board and can't wait for you to start + using Noodle. I am currently working hard to get Noodle ready for you and will be in diff --git a/src/primitives/button.tsx b/src/primitives/button.tsx index 235bbc20..11e0af96 100644 --- a/src/primitives/button.tsx +++ b/src/primitives/button.tsx @@ -13,10 +13,10 @@ const buttonVariants = cva( variants: { variant: { default: - 'bg-gradient-to-br from-salmon to-pink text-black hover:opacity-90', + 'bg-gradient-to-br from-salmon to-pink text-white hover:opacity-90 dark:text-black', destructive: 'bg-red text-white hover:bg-red-solid-hover', outline: - 'border border-gray-subtle-border bg-background text-foreground-muted hover:bg-gray-subtle hover:text-foreground', + 'border border-gray-subtle-border bg-gray-element text-foreground-muted hover:bg-gray-element-hover hover:text-foreground', ghost: 'hover:bg-gray-element', link: 'relative bg-gradient-to-br from-salmon to-pink bg-clip-text text-transparent before:absolute before:bottom-0 before:h-px before:w-[calc(100%-24px)] before:rounded-full before:bg-gradient-to-br before:from-salmon before:to-pink hover:opacity-90', },