diff --git a/packages/app/.env.example b/packages/app/.env.example deleted file mode 100644 index 7ea9a3d1..00000000 --- a/packages/app/.env.example +++ /dev/null @@ -1,16 +0,0 @@ -DATABASE_URL="postgresql://postgres:example@localhost:5432/postgres" - -# Next Auth Discord Provider -# NOTE: The keys below were intentionally committed -# so that beginners don't have to setup their own github app -# just to contribute to this project. This app will only be -# used for local development; it's not used in production. -GITHUB_CLIENT_ID="63b03dd1a029181eede8" -GITHUB_CLIENT_SECRET="fe61fec0056b571d01d0a1e25945904237d164e8" -GITHUB_ACCESS_TOKEN= -NEXTAUTH_SECRET="my_ultra_secure_nextauth_secret" -NEXTAUTH_URL="http://localhost:3000" -OPENAI_API_KEY= -# Enables multiplayer feature on your local development build -MULTIPLAYER=false -NEXT_PUBLIC_WSS_URL=http://localhost:3001 \ No newline at end of file diff --git a/packages/app/src/app/result/page.tsx b/packages/app/src/app/result/page.tsx index cb5013a8..13067437 100644 --- a/packages/app/src/app/result/page.tsx +++ b/packages/app/src/app/result/page.tsx @@ -10,7 +10,7 @@ import { getBestCPM, getCurrentRaceResult, getSnippetVote, - getUserResultsForSnippet + getUserResultsForSnippet, } from "./loaders"; // Components @@ -27,6 +27,7 @@ import { ReplayCode } from "./replay-timestamps"; import { ResultChart } from "./result-chart"; import { TopTable } from "./topten"; import { Voting } from "./voting"; +import SignInLink from "./sign-in-link"; type ResultPageProps = { searchParams: { @@ -259,6 +260,7 @@ async function UnauthenticatedPage({ snippetId }: UnauthenticatedPageProps) { title="Your Race Results" description="You did great! View your race results below" /> +
@@ -320,4 +322,4 @@ async function UnauthenticatedPage({ snippetId }: UnauthenticatedPageProps) {
); -} \ No newline at end of file +} diff --git a/packages/app/src/app/result/sign-in-link.tsx b/packages/app/src/app/result/sign-in-link.tsx new file mode 100644 index 00000000..b4664ded --- /dev/null +++ b/packages/app/src/app/result/sign-in-link.tsx @@ -0,0 +1,23 @@ +"use client"; + +import { signIn } from "next-auth/react"; + +const SignInLink = () => { + return ( +

+ + signIn("github", { + callbackUrl: `${location.origin}`, + }) + } + className="text-primary underline cursor-pointer" + > + Sign in + {" "} + to save your next race ! +

+ ); +}; + +export default SignInLink;