From 7f876ecf1ffe73e0d08cb794eab08f9836b5d99d Mon Sep 17 00:00:00 2001 From: 727021 <1834544+727021@users.noreply.github.com> Date: Tue, 22 Apr 2025 21:17:45 -0600 Subject: [PATCH 1/4] update todo list --- TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.md b/TODO.md index 43f9144..a85ea1b 100644 --- a/TODO.md +++ b/TODO.md @@ -28,6 +28,7 @@ - [ ] rebel - [X] home page (maybe just replace with games page?) - [ ] landing page (before login) +- [ ] Migrate from remix to react-router@7 # Stretch From 575ec562ee96d582809a56120a9925100ba6f030 Mon Sep 17 00:00:00 2001 From: 727021 <1834544+727021@users.noreply.github.com> Date: Thu, 24 Apr 2025 00:11:45 -0600 Subject: [PATCH 2/4] start on clerk auth --- README.md | 9 +- TODO.md | 2 + app/components/AppNav/index.tsx | 85 ++++--- app/components/Footer/index.tsx | 4 +- app/root.tsx | 16 +- app/routes/_account.sign-in.$.tsx | 15 ++ app/routes/_account.sign-up.$.tsx | 15 ++ app/routes/_account.tsx | 15 ++ app/routes/_app.home.tsx | 22 -- app/routes/_app.tsx | 24 +- app/routes/_app.user.$.tsx | 15 ++ app/routes/_index.tsx | 24 +- app/routes/api.webhooks.ts | 43 ++++ package-lock.json | 353 ++++++++++++++++++++++++++++-- package.json | 2 + 15 files changed, 536 insertions(+), 108 deletions(-) create mode 100644 app/routes/_account.sign-in.$.tsx create mode 100644 app/routes/_account.sign-up.$.tsx create mode 100644 app/routes/_account.tsx delete mode 100644 app/routes/_app.home.tsx create mode 100644 app/routes/_app.user.$.tsx create mode 100644 app/routes/api.webhooks.ts diff --git a/README.md b/README.md index 62620f3..f4f12e7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,14 @@ An online campaign manager for [Star Wars: Imperial Assault](https://www.fantasyflightgames.com/en/products/star-wars-imperial-assault/) -




+[![Remix](https://img.shields.io/badge/remix-%23000.svg?style=for-the-badge&logo=remix&logoColor=white)](https://remix.run) +[![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white)](https://vite.dev) +[![Prisma](https://img.shields.io/badge/Prisma-3982CE?style=for-the-badge&logo=Prisma&logoColor=white)](https://www.prisma.io) +[![Vercel](https://img.shields.io/badge/vercel-%23000000.svg?style=for-the-badge&logo=vercel&logoColor=white)](https://vercel.com) +[![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white)](https://tailwindcss.com) +[![DaisyUI](https://img.shields.io/badge/daisyui-5A0EF8?style=for-the-badge&logo=daisyui&logoColor=white)](https://daisyui.com) +[![Clerk](https://img.shields.io/badge/Clerk-6C47FF?style=for-the-badge&logo=clerk&logoColor=white)](https://clerk.com/) +[![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?style=for-the-badge&logo=Cloudflare&logoColor=white)](https://cloudflare.com) --- diff --git a/TODO.md b/TODO.md index a85ea1b..eac31cc 100644 --- a/TODO.md +++ b/TODO.md @@ -29,6 +29,8 @@ - [X] home page (maybe just replace with games page?) - [ ] landing page (before login) - [ ] Migrate from remix to react-router@7 +- [ ] Clerk auth +- [ ] Default theme picker to "os" # Stretch diff --git a/app/components/AppNav/index.tsx b/app/components/AppNav/index.tsx index 1a469c8..4846724 100644 --- a/app/components/AppNav/index.tsx +++ b/app/components/AppNav/index.tsx @@ -1,58 +1,51 @@ -import { Link, NavLink } from '@remix-run/react' +import { + SignedIn, + SignedOut, + SignInButton, + UserButton, + useUser +} from '@clerk/remix' +import { NavLink } from '@remix-run/react' import ThemePicker from '~/components/ThemePicker' -import type { getUser } from '~/services/auth.server' -import { getAvatarUrls } from '~/utils/avatar' -type Props = { - user: Awaited> -} - -const AppNav = ({ user }: Props) => { - const urls = getAvatarUrls(user, 32) +const AppNav = ({ minimal = false }) => { + const { isSignedIn } = useUser() return ( -
+
- + Unquestable
-
-
    -
  • - Collection -
  • -
  • - - Games - -
  • -
-
-
- -
-
- -
    -
  • - Profile -
  • -
  • - Log Out -
  • -
-
+ + + + + + )}
) } diff --git a/app/components/Footer/index.tsx b/app/components/Footer/index.tsx index 1d8d963..e7d6be2 100644 --- a/app/components/Footer/index.tsx +++ b/app/components/Footer/index.tsx @@ -2,7 +2,7 @@ import { Link } from '@remix-run/react' const Footer = () => { return ( -