@@ -79,29 +80,35 @@ export default function Leaderboard() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: index * 0.05 }}
className={`p-4 rounded-lg ${
- entry.rank === 1 ? 'bg-dark-surface border border-neon-green shadow-neon-glow' :
- entry.rank === 2 ? 'bg-dark-surface border border-gray-500' :
- entry.rank === 3 ? 'bg-dark-surface border border-orange-600' :
- 'bg-dark-surface'
+ entry.rank === 1
+ ? "bg-dark-surface border border-neon-green shadow-neon-glow"
+ : entry.rank === 2
+ ? "bg-dark-surface border border-gray-500"
+ : entry.rank === 3
+ ? "bg-dark-surface border border-orange-600"
+ : "bg-dark-surface"
} hover:bg-medium-surface transition-all duration-200 transform hover:scale-[1.02]`}
>
);
-}
\ No newline at end of file
+}
diff --git a/packages/nextjs/app/leaderboard/queries.ts b/packages/nextjs/app/leaderboard/queries.ts
index 49eb05f..115f463 100644
--- a/packages/nextjs/app/leaderboard/queries.ts
+++ b/packages/nextjs/app/leaderboard/queries.ts
@@ -8,4 +8,4 @@ export const LEADERBOARD = gql`
id
}
}
-`;
\ No newline at end of file
+`;
diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx
index 39042af..064a934 100644
--- a/packages/nextjs/app/page.tsx
+++ b/packages/nextjs/app/page.tsx
@@ -36,11 +36,11 @@ const Home: NextPage = () => {
diff --git a/packages/nextjs/components/NewHeader.tsx b/packages/nextjs/components/NewHeader.tsx
index 80cec6d..bb3deda 100644
--- a/packages/nextjs/components/NewHeader.tsx
+++ b/packages/nextjs/components/NewHeader.tsx
@@ -2,106 +2,107 @@ import React, { useState } from "react";
import Image from "next/image";
import "./Header.css";
import blockies from "ethereum-blockies";
-import { useAccount, useConnect, useChainId, useSwitchChain, useDisconnect } from "wagmi";
+import { base, baseSepolia, mainnet, optimism, sepolia } from "viem/chains";
+import { useAccount, useChainId, useConnect, useDisconnect, useSwitchChain } from "wagmi";
import { injected } from "wagmi/connectors";
-import { sepolia, baseSepolia, mainnet, base, optimism } from "viem/chains";
export const NewHeader = () => {
- const { isConnected, address } = useAccount();
- const { connect } = useConnect();
- const { switchChain } = useSwitchChain();
- const currentChainId = useChainId();
- const { disconnect } = useDisconnect();
- const [isWalletMenuOpen, setIsWalletMenuOpen] = useState(false);
+ const { isConnected, address } = useAccount();
+ const { connect } = useConnect();
+ const { switchChain } = useSwitchChain();
+ const currentChainId = useChainId();
+ const { disconnect } = useDisconnect();
+ const [isWalletMenuOpen, setIsWalletMenuOpen] = useState(false);
- const identicon = address ? blockies.create({ seed: address }).toDataURL() : "";
+ const identicon = address ? blockies.create({ seed: address }).toDataURL() : "";
- const networks = [
- { id: sepolia.id, name: sepolia.name, icon: "🔵", config: sepolia },
- { id: baseSepolia.id, name: baseSepolia.name, icon: "🟣", config: baseSepolia },
- { id: mainnet.id, name: mainnet.name, icon: "🌐", config: mainnet },
- { id: base.id, name: base.name, icon: "🔷", config: base },
- { id: optimism.id, name: optimism.name, icon: "🔴", config: optimism }
- ];
-
- const currentNetwork = networks.find(network => network.id === currentChainId) || networks[0];
+ const networks = [
+ { id: sepolia.id, name: sepolia.name, icon: "🔵", config: sepolia },
+ { id: baseSepolia.id, name: baseSepolia.name, icon: "🟣", config: baseSepolia },
+ { id: mainnet.id, name: mainnet.name, icon: "🌐", config: mainnet },
+ { id: base.id, name: base.name, icon: "🔷", config: base },
+ { id: optimism.id, name: optimism.name, icon: "🔴", config: optimism },
+ ];
- const handleNetworkSwitch = async (chainId: number) => {
- try {
- await switchChain({ chainId });
- } catch (err) {
- console.error("Failed to switch network:", err);
- }
- };
+ const currentNetwork = networks.find(network => network.id === currentChainId) || networks[0];
- return (
-
- {/* Left side - Logo */}
-
- StakeFIT
-
+ const handleNetworkSwitch = async (chainId: number) => {
+ try {
+ await switchChain({ chainId });
+ } catch (err) {
+ console.error("Failed to switch network:", err);
+ }
+ };
+
+ return (
+
+ {/* Left side - Logo */}
+
+ StakeFIT
+
+
+ {/* Right side - Wallet Connection with Network Selection */}
+ {!isConnected ? (
+
+ ) : (
+
+
- {/* Right side - Wallet Connection with Network Selection */}
- {!isConnected ? (
+ {isWalletMenuOpen && (
+
+ {/* Network Selection */}
+
+
Switch Network
+ {networks.map(network => (
+
+ ))}
+
+
+ {/* Wallet Actions */}
+
- ) : (
-
-
-
- {isWalletMenuOpen && (
-
- {/* Network Selection */}
-
-
Switch Network
- {networks.map((network) => (
-
- ))}
-
-
- {/* Wallet Actions */}
-
-
-
-
- )}
-
- )}
+
+
+ )}
- );
+ )}
+
+ );
};
-export default NewHeader;
\ No newline at end of file
+export default NewHeader;
diff --git a/packages/nextjs/components/StepComponent.tsx b/packages/nextjs/components/StepComponent.tsx
index 75f3edb..61c1bd1 100644
--- a/packages/nextjs/components/StepComponent.tsx
+++ b/packages/nextjs/components/StepComponent.tsx
@@ -7,25 +7,23 @@ interface StepComponentProps {
const StepComponent: FC
= ({ currentSteps, totalSteps }) => {
const percentage = Math.round((currentSteps / totalSteps) * 100);
-
+
return (
-
- {currentSteps.toLocaleString()}
-
+ {currentSteps.toLocaleString()}
/{totalSteps.toLocaleString()} steps
-
+
-
@@ -38,4 +36,4 @@ const StepComponent: FC = ({ currentSteps, totalSteps }) =>
);
};
-export default StepComponent;
\ No newline at end of file
+export default StepComponent;