Skip to content

Commit

Permalink
Merge pull request #166 from Benjtalkshow/fix/refactor-navbar-items
Browse files Browse the repository at this point in the history
[fix] Refactor navBarItems
  • Loading branch information
adrianvrj authored Oct 28, 2024
2 parents 6a16df5 + 34f7329 commit 2e062d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 1 addition & 5 deletions frontend/gostarkme-web/app/app/myfunds/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ import { useState } from 'react';
import { useEventListener, useLocalStorage } from 'usehooks-ts'
import { useAtomValue } from 'jotai';
import { walletStarknetkitLatestAtom } from '@/state/connectedWallet';
import { navItems } from '@/constants';

const MyFundsPage = () => {
const wallet = useAtomValue(walletStarknetkitLatestAtom);

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

return (
<div className="min-h-screen flex flex-col">
<Navbar
Expand Down
7 changes: 2 additions & 5 deletions frontend/gostarkme-web/app/app/myprofile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ import { useEventListener } from 'usehooks-ts';
import { useState } from 'react';
import { walletStarknetkitLatestAtom } from '@/state/connectedWallet';
import { useAtomValue } from 'jotai';
import { navItems } from '@/constants';


const UserProfilePage = () => {

const wallet = useAtomValue(walletStarknetkitLatestAtom);

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

// Mock data for design purposes
const totalDonations = 20000;
const currentLevel = 10;
Expand Down
7 changes: 2 additions & 5 deletions frontend/gostarkme-web/app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React from "react";
import FundCards from "@/components/dashboard/fundCard";
import Footer from "@/components/ui/Footer";
import Navbar from "@/components/ui/Navbar";
import React from "react";
import { navItems } from "@/constants";

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

const funds = [
{
Expand Down
5 changes: 5 additions & 0 deletions frontend/gostarkme-web/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ export const ARGENT_SESSION_SERVICE_BASE_URL =

export const ARGENT_WEBWALLET_URL =
process.env.NEXT_PUBLIC_ARGENT_WEBWALLET_URL || "https://web.argent.xyz"

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

0 comments on commit 2e062d0

Please sign in to comment.