diff --git a/package-lock.json b/package-lock.json index a292828..67ea1a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@radix-ui/react-dropdown-menu": "^2.1.6", "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-popover": "^1.1.6", "@radix-ui/react-slot": "^1.1.2", "@tailwindcss/vite": "^4.0.9", "class-variance-authority": "^0.7.1", @@ -2095,6 +2096,43 @@ } } }, + "node_modules/@radix-ui/react-popover": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.6.tgz", + "integrity": "sha512-NQouW0x4/GnkFJ/pRqsIS3rM/k97VzKnVb2jB7Gq7VEGPy5g7uNV1ykySFt7eWSp3i2uSGFwaJcvIRJBAHmmFg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-popper": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz", diff --git a/package.json b/package.json index d6551c1..4be0cd8 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@radix-ui/react-dropdown-menu": "^2.1.6", "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-popover": "^1.1.6", "@radix-ui/react-slot": "^1.1.2", "@tailwindcss/vite": "^4.0.9", "class-variance-authority": "^0.7.1", diff --git a/public/images/photo1.jpg b/public/images/photo1.jpg new file mode 100644 index 0000000..86725dc Binary files /dev/null and b/public/images/photo1.jpg differ diff --git a/public/images/photo8.jpg b/public/images/photo8.jpg new file mode 100644 index 0000000..ed57e90 Binary files /dev/null and b/public/images/photo8.jpg differ diff --git a/src/App.tsx b/src/App.tsx index 70281ef..8c4804f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import React from 'react'; import AuthContext from './context/AuthContext'; import connectToBlockchain from './config'; import Layout from '@/pages/layout'; +import CandidatePage from './pages/AddCandidatePage'; function App() { const auth = React.useContext(AuthContext); @@ -66,6 +67,7 @@ function App() { create election} /> active election} /> + } /> not found return 404} /> diff --git a/src/components/shared/Navbar.tsx b/src/components/shared/Navbar.tsx index cf94b6c..485806e 100644 --- a/src/components/shared/Navbar.tsx +++ b/src/components/shared/Navbar.tsx @@ -1,7 +1,7 @@ -import type React from 'react'; +import React from 'react'; import { useState } from 'react'; import { Link } from 'react-router'; -import { Vote, Menu, User, LogOut } from 'lucide-react'; +import { Vote, Menu } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; @@ -15,16 +15,11 @@ import { navigationMenuTriggerStyle, } from '@/components/ui/navigation-menu'; import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu'; +import { getCurrentConnection } from '@/config'; export default function Navbar() { const [isOpen, setIsOpen] = useState(false); + const is_connected = !!getCurrentConnection(); return (
@@ -74,8 +69,8 @@ export default function Navbar() { - - How It Works + + Register as voter @@ -87,37 +82,12 @@ export default function Navbar() {
- {/* User Account Dropdown */} - - - - - - - - My Profile - - - - - My Votes - - - - - - - Logout - - - - - - - +