From a3e599830ced30607b2b9d65274262e8b266e8b1 Mon Sep 17 00:00:00 2001 From: adrianvrj Date: Thu, 3 Oct 2024 12:15:55 -0600 Subject: [PATCH] [feat] adding navigation to the entire app --- frontend/gostarkme-web/.gitignore | 7 ++++- .../app/app/myprofile/[useraddr]/page.tsx | 10 +++---- frontend/gostarkme-web/app/app/page.tsx | 2 +- .../components/modules/myfunds/UserFunds.tsx | 27 ++++++++++--------- .../gostarkme-web/components/ui/Bounded.tsx | 4 +-- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/frontend/gostarkme-web/.gitignore b/frontend/gostarkme-web/.gitignore index d13968e..66e9cfc 100644 --- a/frontend/gostarkme-web/.gitignore +++ b/frontend/gostarkme-web/.gitignore @@ -35,4 +35,9 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts -/package-lock.json \ No newline at end of file +/package-lock.json +/package.json +/yarn.lock +/.env* +/.env.example +/next.config.mjs \ No newline at end of file diff --git a/frontend/gostarkme-web/app/app/myprofile/[useraddr]/page.tsx b/frontend/gostarkme-web/app/app/myprofile/[useraddr]/page.tsx index 17aadef..387acdb 100644 --- a/frontend/gostarkme-web/app/app/myprofile/[useraddr]/page.tsx +++ b/frontend/gostarkme-web/app/app/myprofile/[useraddr]/page.tsx @@ -4,11 +4,6 @@ import Image from 'next/image'; import Footer from '@/components/ui/Footer'; import Navbar from '@/components/ui/Navbar'; -const navItems = [ - { label: 'My Profile', href: '/profile' }, - { label: 'My funds', href: '/funds' } -]; - interface UserProfilePageProps { params: { useraddr: string; @@ -22,6 +17,11 @@ export function generateStaticParams() { const UserProfilePage: React.FC = ({ params }) => { const { useraddr } = params; + const navItems = [ + { label: 'My Profile', href: `/app/myprofile/${useraddr}` }, + { label: 'My funds', href: `/app/myfunds/${useraddr}` } + ]; + // Mock data for design purposes const totalDonations = 20000; const currentLevel = 10; diff --git a/frontend/gostarkme-web/app/app/page.tsx b/frontend/gostarkme-web/app/app/page.tsx index e503d18..d8497e7 100644 --- a/frontend/gostarkme-web/app/app/page.tsx +++ b/frontend/gostarkme-web/app/app/page.tsx @@ -6,7 +6,7 @@ import React from "react"; const Dashboard = () => { const navItems = [ { label: 'My Profile', href: 'app/myprofile/1' }, - { label: 'My funds', href: '/funds' } + { label: 'My funds', href: '/app/myfunds/1' } ]; const funds = [ diff --git a/frontend/gostarkme-web/components/modules/myfunds/UserFunds.tsx b/frontend/gostarkme-web/components/modules/myfunds/UserFunds.tsx index 9f970f1..7f44e4a 100644 --- a/frontend/gostarkme-web/components/modules/myfunds/UserFunds.tsx +++ b/frontend/gostarkme-web/components/modules/myfunds/UserFunds.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useState } from 'react'; import FundCard from '@/components/modules/myfunds/FundCard'; import { Button } from '@/components/ui/Button'; +import { LinkButton } from '@/components/ui/LinkButton'; interface UserFundsProps { userAddress: string; @@ -53,28 +54,28 @@ const UserFunds: React.FC = ({ userAddress }) => {

My Funds ✨

-