diff --git a/app/layout.tsx b/app/layout.tsx index 3314e47..bc15d61 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -5,8 +5,8 @@ import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "CallFi Dashboard", + description: "Call out next big mover and win!", }; export default function RootLayout({ diff --git a/app/page.tsx b/app/page.tsx index 061bb77..fa31729 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,5 +1,8 @@ +"use client"; // This line marks the file as a client component + +import React, { useState, useEffect } from "react"; +import { SunIcon, MoonIcon } from "@heroicons/react/solid"; import Image from "next/image"; -import React from "react"; // Helper functions to generate pseudo data const generateRandomName = () => { @@ -32,19 +35,39 @@ const generateTableData = (rows) => { const tableData = generateTableData(10); export default function Home() { + const [darkMode, setDarkMode] = useState(true); + + useEffect(() => { + if (darkMode) { + document.documentElement.classList.add("dark"); + } else { + document.documentElement.classList.remove("dark"); + } + }, [darkMode]); + + const toggleDarkMode = () => { + setDarkMode(!darkMode); + document.documentElement.classList.toggle("dark", !darkMode); + }; + return ( -
-
+
+

CallFi

- +
+ + +

Leaderboard

- - +
+ @@ -53,7 +76,7 @@ export default function Home() { {tableData.map((row, index) => ( - + diff --git a/package-lock.json b/package-lock.json index 51e44ab..d329fcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "callfi", "version": "0.1.0", "dependencies": { + "@heroicons/react": "^1.0.6", "@radix-ui/react-icons": "^1.3.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -106,6 +107,14 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@heroicons/react": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-1.0.6.tgz", + "integrity": "sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ==", + "peerDependencies": { + "react": ">= 16" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", diff --git a/package.json b/package.json index b49d281..c67f8a2 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@heroicons/react": "^1.0.6", "@radix-ui/react-icons": "^1.3.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1",
Name Coin
{row.name} {row.coin} {row.point}