Skip to content

Commit

Permalink
added the dashboard for the user
Browse files Browse the repository at this point in the history
  • Loading branch information
Dharmik79 committed Feb 17, 2024
1 parent 0d1a83c commit 9904658
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
46 changes: 46 additions & 0 deletions packages/nextjs/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"use client"

import React from "react";

const page = () => {
const handleNewPlaceSubmit = () => {
console.log("clicked");
// router.push("/dashboard");
// Check for the status of the user info and allow the user to play the game and set the navigation accordingly
};
return (
<div className="flex h-screen text-black">
<div className="w-64 flex flex-col p-4">
<button
className="flex items-center justify-center h-12 w-full bg-blue-500 mb-4"
onClick={handleNewPlaceSubmit}

>
New Place
</button>
<button className="flex items-center justify-center h-12 w-full bg-blue-500 mb-4">
My Places
</button>
<button className="flex items-center justify-center h-12 w-full bg-blue-500 mb-4">
All Places
</button>
</div>

<div className="flex-1 flex flex-col ">
<div className="flex justify-around p-4">
<div className="flex items-center">
<span className="icon lightning-bolt"></span>
<span className="text-black text-3xl">My Solarpunk places</span>
</div>

<div className="flex items-start space-x-2">
<span className="icon lightning-bolt"></span>
<span className="text-black text-3xl">My Cyberpunk places</span>
</div>
</div>
</div>
</div>
);
};

export default page;
6 changes: 4 additions & 2 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import type { NextPage } from "next";
import { useEffect } from "react";
import { useAccount } from "wagmi";
import { useRouter } from "next/navigation";

const Home: NextPage = () => {
const { isConnected } = useAccount();

const router = useRouter();

const handleSubmit = () => {
console.log("clicked");
router.push("/dashboard");
// Check for the status of the user info and allow the user to play the game and set the navigation accordingly
}
return (
Expand All @@ -22,7 +24,7 @@ const Home: NextPage = () => {
{isConnected ? (
<div className="mt-10 p-4 justify-center items-center">

<button className="px-6 py-3 bg-blue-700 text-white rounded hover:bg-blue-800 transition duration-150 ease-in-out" onSubmit={handleSubmit}>
<button className="px-6 py-3 bg-blue-700 text-white rounded hover:bg-blue-800 transition duration-150 ease-in-out" onClick={handleSubmit} type="submit">
Play Game
</button>
</div>
Expand Down

0 comments on commit 9904658

Please sign in to comment.