Skip to content

Commit

Permalink
make the upload map page look nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevcody committed Oct 17, 2024
1 parent 08238bf commit 35d7e79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 96 deletions.
90 changes: 0 additions & 90 deletions app/games/[gameId]/visualizer.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function Header() {
</Link>
{isAuthenticated && (
<Link href="/maps">
<Button variant="ghost">Add custom Maps</Button>
<Button variant="ghost">Submit Map</Button>
</Link>
)}
{flags?.showTestPage && (
Expand Down
12 changes: 7 additions & 5 deletions app/maps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default function AddMapPage() {
console.log("All set");
console.log(map);
alert("No place left to place the player!");
}else{
createMap({grid: map});
} else {
createMap({ grid: map });
alert("Map saved");
}
};
Expand All @@ -60,15 +60,17 @@ export default function AddMapPage() {
if (map[y][x] == "B") {
cell = " ";
} else {
cell = "B";
cell = "R";
}
}
const newMap = map.map((row) => [...row]);
newMap[y][x] = cell;
setMap(newMap);
};
return (
<div className="flex-col container mx-auto">
<div className="container mx-auto min-h-screen py-12 pb-24 gap-8">
<h1 className="text-center text-3xl font-semibold mb-6">Submit Map</h1>

{isSubmitted ? (
<div>
<div className="flex justify-center m-5">
Expand All @@ -84,7 +86,7 @@ export default function AddMapPage() {
variant={isZombie ? "outline" : "default"}
onClick={() => setIsZombie(false)}
>
Place Block
Place Rock
</Button>
</div>
<div className="justify-center m-5">
Expand Down

0 comments on commit 35d7e79

Please sign in to comment.