-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bb383c
commit 77a4da1
Showing
15 changed files
with
412 additions
and
65 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
-- CreateTable | ||
CREATE TABLE "Account" ( | ||
"id" TEXT NOT NULL, | ||
"userId" TEXT NOT NULL, | ||
"type" TEXT NOT NULL, | ||
"provider" TEXT NOT NULL, | ||
"providerAccountId" TEXT NOT NULL, | ||
"refresh_token" TEXT, | ||
"access_token" TEXT, | ||
"expires_at" INTEGER, | ||
"token_type" TEXT, | ||
"scope" TEXT, | ||
"id_token" TEXT, | ||
"session_state" TEXT, | ||
|
||
CONSTRAINT "Account_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Session" ( | ||
"id" TEXT NOT NULL, | ||
"sessionToken" TEXT NOT NULL, | ||
"userId" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Session_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" TEXT NOT NULL, | ||
"name" TEXT, | ||
"email" TEXT, | ||
"emailVerified" TIMESTAMP(3), | ||
"image" TEXT, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "VerificationToken" ( | ||
"identifier" TEXT NOT NULL, | ||
"token" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "postgresql" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,112 @@ | ||
"use client" | ||
|
||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
import { signIn } from "next-auth/react"; | ||
import classNames from "classnames"; | ||
|
||
import { montserrat } from "@/lib/fonts"; | ||
import { Button } from "@/components/ui/button"; | ||
import { FloatingUsersComponent } from "./floating-users"; | ||
import { useUser } from "@/hooks/useUser"; | ||
|
||
|
||
export default function SignInLandingComponent() { | ||
const { authStatus, userDetails } = useUser(); | ||
|
||
|
||
return ( | ||
<section className={classNames(`${montserrat.className}`, { | ||
"flex flex-row items-center justify-between divide-x-2": true, | ||
"divide-zinc-400 dark:divide-zinc-600": true, | ||
"flex flex-row items-center justify-around": true, | ||
})}> | ||
<div className={classNames({ | ||
"space-y-16": true, | ||
})}> | ||
<h1 className={classNames({ | ||
"font-bold dark:text-amber-400 text-5xl": true, | ||
"font-bold text-5xl": true, | ||
})} | ||
> | ||
Welcome to BioSync | ||
</h1> | ||
|
||
<p className={classNames({ | ||
"text-3xl": true, | ||
"text-3xl text-blue-700 dark:text-sky-300": true, | ||
})}> | ||
Your one stop to share your bio with anyone, <br /> anytime and anywhere... | ||
</p> | ||
|
||
<p className={classNames({ | ||
"text-4xl font-bold text-orange-400": true, | ||
})}> | ||
Sign In to continue to BioSync | ||
</p> | ||
{authStatus === "unauthenticated" | ||
? demo.unauthFooter | ||
: demo.authFooter | ||
} | ||
</div > | ||
|
||
<div className={classNames({ | ||
"flex flex-row gap-x-3": true, | ||
})}> | ||
<Button | ||
variant={"secondary"} | ||
onClick={() => signIn("github", { callbackUrl: "/dashboard" })} | ||
className={classNames({ | ||
"outline outline-1 outline-zinc-500 text-pink-500 font-bold": true, | ||
})} | ||
> | ||
Continue with GitHub | ||
</Button> | ||
|
||
<Button | ||
variant={"secondary"} | ||
onClick={() => signIn("discord", { callbackUrl: "/dashboard" })} | ||
className={classNames({ | ||
"outline outline-1 outline-zinc-500 text-pink-500 font-bold": true, | ||
})} | ||
> | ||
Continue with Discord | ||
</Button> | ||
</div> | ||
<div className={classNames({ | ||
})}> | ||
<Image | ||
alt="sign-in image" | ||
src={"/sign-in.svg"} | ||
width={"500"} | ||
height={"500"} | ||
placeholder="blur" | ||
blurDataURL="/sign-in.svg" | ||
/> | ||
</div> | ||
</section > | ||
) | ||
} | ||
|
||
|
||
|
||
const demo = { | ||
unauthFooter: ( | ||
<> | ||
<p className={classNames({ | ||
"text-4xl font-bold text-orange-400": true, | ||
})}> | ||
Sign In to continue to BioSync | ||
</p> | ||
|
||
<div className={classNames({ | ||
"relative h-[60vh] w-[35vw]": true, | ||
"flex flex-row gap-x-3": true, | ||
})}> | ||
<FloatingUsersComponent | ||
top={"top-5"} | ||
left={"left-0"} | ||
bgColor="bg-red-600 dark:bg-amber-700" | ||
skeleton1Bg="bg-orange-400" | ||
skeleton2Bg="bg-yellow-400" | ||
/> | ||
<Button | ||
variant={"secondary"} | ||
onClick={() => signIn("github", { callbackUrl: "/dashboard" })} | ||
className={classNames({ | ||
"outline outline-1 outline-zinc-100 text-zinc-700 dark:text-white font-bold": true, | ||
})} | ||
> | ||
Continue with GitHub | ||
</Button> | ||
|
||
<FloatingUsersComponent | ||
top={"top-10"} | ||
left={"left-48"} | ||
bgColor="bg-sky-600" | ||
skeleton1Bg="bg-cyan-400" | ||
skeleton2Bg="bg-violet-300" | ||
/> | ||
<Button | ||
variant={"secondary"} | ||
onClick={() => signIn("discord", { callbackUrl: "/dashboard" })} | ||
className={classNames({ | ||
"outline outline-1 outline-zinc-100 text-zinc-700 dark:text-white font-bold": true, | ||
})} | ||
> | ||
Continue with Discord | ||
</Button> | ||
</div> | ||
</section> | ||
</> | ||
), | ||
|
||
authFooter: ( | ||
<div className={classNames({ | ||
"flex flex-col gap-y-5": true | ||
})}> | ||
<p className={classNames({ | ||
"": true, | ||
})}> | ||
Continue to your Dashboard | ||
</p> | ||
|
||
<Link href={"/dashboard"}> | ||
<Button variant={"secondary"}> | ||
Head to Dashboard | ||
</Button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.