Skip to content

Commit

Permalink
Revert "Light mode with theme toggle"
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevcody authored Oct 16, 2024
1 parent 098c053 commit c53f77f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
21 changes: 7 additions & 14 deletions app/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Button } from "@/components/ui/button";
import { useAuthActions } from "@convex-dev/auth/react";
import { GitHubLogoIcon } from "@radix-ui/react-icons";
import { useConvexAuth } from "convex/react";
import { ThemeToggle } from "@/components/ThemeToggle";

function SignInWithGitHub() {
const { signIn } = useAuthActions();
Expand All @@ -15,7 +14,6 @@ function SignInWithGitHub() {
variant="outline"
type="button"
onClick={() => void signIn("github", { redirectTo: "/" })}
className="dark:invert"
>
<GitHubLogoIcon className="mr-2 h-4 w-4" /> GitHub
</Button>
Expand All @@ -27,16 +25,14 @@ export default function Header() {
const { isAuthenticated } = useConvexAuth();

return (
<header className="flex justify-between items-center py-4 px-6 shadow-sm border-b bg-gray-200 dark:bg-slate-950">
<header className="flex justify-between items-center py-4 px-6 shadow-sm border-b bg-slate-950">
<Link href="/" className="flex items-center">
<Image src="/logo.png" alt="Logo" width={32} height={32} />
<span className="ml-2 text-xl font-bold">SurviveTheNight</span>
</Link>

<div className="flex items-center">
<span className="mr-2 text-sm text-gray-900 dark:text-gray-200">
Synced using Convex
</span>
<span className="mr-2 text-sm text-gray-200">Synced using Convex</span>
<Link
href="https://www.convex.dev"
target="_blank"
Expand All @@ -46,14 +42,11 @@ export default function Header() {
</Link>
</div>

<div className="flex space-x-8">
<ThemeToggle />
{!isAuthenticated ? (
<SignInWithGitHub />
) : (
<Button onClick={() => void signOut()}>Sign Out</Button>
)}
</div>
{!isAuthenticated ? (
<SignInWithGitHub />
) : (
<Button onClick={() => void signOut()}>Sign Out</Button>
)}
</header>
);
}
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function RootLayout({
<body className={inter.className}>
<Providers>
<Header />
<main className="bg-background">{children}</main>
{children}
</Providers>
</body>
</html>
Expand Down
4 changes: 2 additions & 2 deletions convex/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const playMapAction = internalAction({
"R" represents rocks, which players can shoot over but zombies cannot pass through or break.
"P" represents the player, who cannot move. The player's goal is to shoot and kill zombies before they reach them.
"B" represents blocks that can be placed before the round begins to hinder the zombies. You can place up to two blocks on the map.
Your goal is to place the player ("P") and two blocks ("B") in locations that maximize the player's survival by delaying the zombies' approach.
You can shoot any zombie regardless of where it is on the grid.
Returning a 2d grid with the player and blocks placed in the optimal locations, with the coordinates player ("P") and the blocks ("B"), also provide reasoning for the choices.
You can't replace rocks R or zombies Z with blocks. If there is no room to place a block, do not place any.`,
},
{
Expand Down

0 comments on commit c53f77f

Please sign in to comment.