Skip to content

Commit

Permalink
Merge pull request #113 from adrianvrj/dev
Browse files Browse the repository at this point in the history
[feat] added navigation to user profile and integrate dashboard
  • Loading branch information
adrianvrj authored Sep 30, 2024
2 parents 1d5e059 + 818c1ac commit 3afdce7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import FundCards from "@/components/dashboard/fundCard";
import Footer from "@/components/ui/Footer";
import Navbar from "@/components/ui/Navbar";
import React from "react";

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

const funds = [
{
type: "Project",
Expand Down Expand Up @@ -36,8 +43,18 @@ const Dashboard = () => {
},
];
return (
<div className="container mx-auto p-6 min-h-screen">
<h1 className="text-4xl font-bold mb-6 flex items-center">
<div className="flex min-h-screen w-full flex-col items-center">
<Navbar
logoSrc={process.env.NEXT_PUBLIC_APP_ROOT + "icons/starklogo.png"}
logoAlt="Go Stark Me logo"
title="Go Stark Me"
navItems={navItems}
ctaButton={{
label: "Connect wallet",
href: "/"
}}
/>
<h1 className="text-3xl font-bold ml-30 mb-6 flex items-center self-start m-10 ml-28">
Latest Funds
<span className="ml-2 text-yellow-400">&#x2728;</span>
</h1>
Expand All @@ -46,6 +63,7 @@ const Dashboard = () => {
<FundCards key={index} fund={fund} index={index} />
))}
</div>
<Footer></Footer>
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/gostarkme-web/components/dashboard/fundCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ const FundCards = ({ fund, index }: FundCardProps) => {
<p className=" text-sm md:text-base lg:text-lg text-white font-light leading-[22px] md:leading-[25px] lg:leading-[27.6px]">
{fund.type} {fund.type === "Project" ? <span>&#x1f680;</span> : <span>&#x1FAC0;</span>}
</p>
<h1 className="text-xl md:text-2xl lg:text-[40px] font-bold">
<h1 className="text-xl md:text-xl lg:text-[40px] font-bold">
{fund.title}
</h1>
</div>
<div>
<p className="text-lg md:text-2xl lg:text-4xl text-white">
<p className="text-lg md:text-lg lg:text-4xl text-white">
{fund.description}
</p>
</div>
Expand Down
22 changes: 12 additions & 10 deletions frontend/gostarkme-web/components/ui/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ export const Navbar = ({
<nav className="sticky bg-white top-0 w-full z-20 border-b-[1px] border-darkblue">
<div className="max-w-screen-2xl mx-auto w-full p-4 flex flex-col md:flex-row items-center md:justify-between">
<div className="flex flex-col md:flex-row items-center md:space-x-8">
<div className="flex flex-col md:flex-row items-center space-y-2 md:space-y-0 md:space-x-2 mb-4 md:mb-0">
<Image
src={logoSrc}
alt={logoAlt}
width={24}
height={24}
className="md:w-[30px] md:h-[30px]"
/>
<span className="text-lg md:text-xl font-semibold">{title}</span>
</div>
<Link href={"/app"}>
<div className="flex flex-col md:flex-row items-center space-y-2 md:space-y-0 md:space-x-2 mb-4 md:mb-0">
<Image
src={logoSrc}
alt={logoAlt}
width={24}
height={24}
className="md:w-[30px] md:h-[30px]"
/>
<span className="text-lg md:text-xl font-semibold">{title}</span>
</div>
</Link>
<div className="flex flex-col md:flex-row items-center space-y-2 md:space-y-0 md:space-x-6 mb-4 md:mb-0">
{navItems.map((item) => (
<Link key={item.href} href={item.href} className="text-gray-700 hover:text-gray-900">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const WelcomeBar = () => {
</div>
<LinkButton
label="Go to app"
href="/"
href="/app"
/>
</div>
</nav>
Expand Down

0 comments on commit 3afdce7

Please sign in to comment.