Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#24 general fixes to prepare for odboost #25

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@ const Dashboard = () => {
}

useEffect(() => {
console.log(navItems);
getFunds();
}, []);

11 changes: 0 additions & 11 deletions components/modules/Fund/Fund.tsx
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
import FundDonate from "./FundDonate";
import starknetlogo from "@/public/icons/starklogo.png";
import { FundVote } from "./FundVote";
import Image from "next/image";
import { useEffect, useState } from "react";
import { FUND_MANAGER_ADDR, provider, upVotesNeeded } from "@/constants";
import Divider from "@/components/ui/Divider";
@@ -18,7 +17,6 @@ import { FundWithdraw } from "./FundWithdraw";

const Fund = () => {
const wallet = useAtomValue(walletStarknetkitLatestAtom);
const ROOT = process.env.NEXT_PUBLIC_APP_ROOT;
const [fund, setFund] = useState<any>({});
const [loading, setLoading] = useState(true);
const [isOwner, setIsOwner] = useState(false);
@@ -85,15 +83,6 @@ const Fund = () => {
<section>
<h1 className="font-bold text-2xl">{fund.name}</h1>
<Divider />
{/* TODO: remove this once event is finished */}
<Image
src={ROOT + "images/dojo-event.jpg"}
alt="dojo event"
height={771}
width={450}
className="self-center justify-self-center w-2/3 max-w-80 rounded-2xl"
/>
<Divider />
<h2 className="text-xl">Description</h2>
<p>{fund.desc}</p>
<Divider />
38 changes: 28 additions & 10 deletions components/ui/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -26,17 +26,35 @@ export const Navbar = ({
return (
<nav className="sticky bg-white top-0 w-full z-20 border-b-[1px] border-gray-300">
<div className="max-w-screen-2xl mx-auto w-full px-4 py-3 flex justify-between items-center">
{/* Logo and Title */}
<Link href={"/app"} className="flex items-center space-x-2">
<Image src={logoSrc} alt={logoAlt} width={30} height={30} />
<span className="text-lg font-semibold">{title}</span>
</Link>
{/* Wallet Button (always visible for mobile) */}
<div className="bottom-4 right-4 md:hidden">
<ConnectWallet />
{/* Left section: Logo, Title and Desktop Menu */}
<div className="flex items-center space-x-6">
{/* Logo and Title */}
<Link href={"/app"} className="flex items-center space-x-2">
<Image src={logoSrc} alt={logoAlt} width={30} height={30} />
<span className="text-lg font-semibold">{title}</span>
</Link>

{/* Desktop Menu */}
<div className="hidden md:flex items-center space-x-6">
{navItems.map((item) => (
<Link
key={item.href}
href={item.href}
className="text-gray-700 hover:text-gray-900"
>
{item.label}
</Link>
))}
</div>
</div>
{/* Navigation and Wallet Button */}

{/* Right section: Wallet Button and Mobile Menu */}
<div className="flex items-center space-x-4">
{/* Wallet Button (mobile) */}
<div className="bottom-4 right-4 md:hidden">
<ConnectWallet />
</div>

{/* Hamburger Icon */}
<button
className="md:hidden text-gray-700 hover:text-gray-900 focus:outline-none"
@@ -58,7 +76,7 @@ export const Navbar = ({
</svg>
</button>

{/* Connect Wallet Button */}
{/* Connect Wallet Button (desktop) */}
<div className="hidden md:block">
<ConnectWallet />
</div>
4 changes: 2 additions & 2 deletions constants/index.ts
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@ export const FUND_MANAGER_ADDR =
process.env.NEXT_PUBLIC_FUND_MANAGER_ADDR || "";

export const navItems = [
// { label: 'My Profile', href: '/app/myprofile' },
// { label: 'My funds', href: '/app/myfunds' }
{ label: 'My Profile', href: '/app/myprofile' },
{ label: 'My funds', href: '/app/myfunds' }
];

export const upVotesNeeded = 50;