Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions packages/app/.env.example

This file was deleted.

6 changes: 4 additions & 2 deletions packages/app/src/app/result/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
getBestCPM,
getCurrentRaceResult,
getSnippetVote,
getUserResultsForSnippet
getUserResultsForSnippet,
} from "./loaders";

// Components
Expand All @@ -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: {
Expand Down Expand Up @@ -259,6 +260,7 @@ async function UnauthenticatedPage({ snippetId }: UnauthenticatedPageProps) {
title="Your Race Results"
description="You did great! View your race results below"
/>
<SignInLink />
</div>

<div className="flex flex-col px-8 rounded-xl">
Expand Down Expand Up @@ -320,4 +322,4 @@ async function UnauthenticatedPage({ snippetId }: UnauthenticatedPageProps) {
</div>
</main>
);
}
}
23 changes: 23 additions & 0 deletions packages/app/src/app/result/sign-in-link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import { signIn } from "next-auth/react";

const SignInLink = () => {
return (
<p className="m-auto text text-sm ">
<span
onClick={() =>
signIn("github", {
callbackUrl: `${location.origin}`,
})
}
className="text-primary underline cursor-pointer"
>
Sign in
</span>{" "}
<span className="text-muted-foreground">to save your next race !</span>
</p>
);
};

export default SignInLink;