From 886aca42497f8e3ab68c3b481805c8081b7155ee Mon Sep 17 00:00:00 2001 From: Puru D Date: Wed, 29 May 2024 23:43:51 -0500 Subject: [PATCH] feat: setting /new as un-authenticated route --- README.md | 2 +- .../new/components/LoginWithGoogle.tsx | 0 src/app/{ => (unauthenticated)}/new/page.tsx | 9 ++------- 3 files changed, 3 insertions(+), 8 deletions(-) rename src/app/{ => (unauthenticated)}/new/components/LoginWithGoogle.tsx (100%) rename src/app/{ => (unauthenticated)}/new/page.tsx (86%) diff --git a/README.md b/README.md index 1054048f8..391b9b3fa 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ We have a community of developers, designers, and entrepreneurs who are passiona ---

Getting started

-When contributing to **Captable, Inc.**, whether on GitHub or in other community spaces: +When contributing to Captable, Inc., whether on GitHub or in other community spaces: - Be respectful, civil, and open-minded. - Before opening a new pull request, try searching through the [issue tracker](https://github.com/captableinc/captable/issues) for known issues or fixes. diff --git a/src/app/new/components/LoginWithGoogle.tsx b/src/app/(unauthenticated)/new/components/LoginWithGoogle.tsx similarity index 100% rename from src/app/new/components/LoginWithGoogle.tsx rename to src/app/(unauthenticated)/new/components/LoginWithGoogle.tsx diff --git a/src/app/new/page.tsx b/src/app/(unauthenticated)/new/page.tsx similarity index 86% rename from src/app/new/page.tsx rename to src/app/(unauthenticated)/new/page.tsx index 45ef07daf..d1a5d96c1 100644 --- a/src/app/new/page.tsx +++ b/src/app/(unauthenticated)/new/page.tsx @@ -1,18 +1,13 @@ -import { Button } from "@/components/ui/button"; import { env } from "@/env"; import { getServerAuthSession } from "@/server/auth"; -import { - RiCheckboxCircleFill as CheckIcon, - RiGoogleFill as GoogleIcon, -} from "@remixicon/react"; +import { RiCheckboxCircleFill as CheckIcon } from "@remixicon/react"; import { redirect } from "next/navigation"; import { notFound } from "next/navigation"; import LoginWithGoogle from "./components/LoginWithGoogle"; export default async function CapPage() { - if (env.NEXT_PUBLIC_BASE_URL !== "https://cloud.captable.inc") { - // if (env.NEXT_PUBLIC_BASE_URL !== "http://localhost:3000") { + if (!env.NEXT_PUBLIC_BASE_URL.includes("captable.inc")) { return notFound(); }