Skip to content

Commit 3dc0e5e

Browse files
authored
Merge branch 'use_uv' into user_dashboard
2 parents 5f11edb + c6b4a0c commit 3dc0e5e

3 files changed

Lines changed: 13 additions & 43 deletions

File tree

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
// src/components/ui/button_go_organization_dashboard.tsx
2-
3-
/*
4-
This is the button component that will take us to the organization dashboard page
5-
Copy this function into its own file so it can be reused in multiple places
6-
*/
7-
8-
// Next.js uses the Link component for client-side navigation
9-
// better and faster then <a> tags.
101
import Link from "next/link";
11-
import React from "react";
122

13-
/*
14-
legacyBehavior is used to enable the older behavior of Link component
15-
we dont actually need to have an <a> tag inside Link cause Link itself can handle it,
16-
but for styling purposes we are using it here
17-
*/
18-
const ButtonGoOrganizationDashboard = () => {
3+
export default function ButtonGoUserPage() {
194
return (
20-
// Change the href to match the new page name, the name is based on the file name
21-
// example: organization_dashboard.tsx -> /organization_dashboard
22-
<Link href="/organization_dashboard" legacyBehavior>
23-
<a
5+
<Link href="/user_page">
6+
<button
247
style={{
258
padding: "10px 20px",
269
marginTop: "20px",
@@ -31,11 +14,8 @@ const ButtonGoOrganizationDashboard = () => {
3114
fontSize: "1.1em",
3215
}}
3316
>
34-
Go to Dashboard
35-
</a>
17+
Go to User Page
18+
</button>
3619
</Link>
3720
);
38-
};
39-
40-
// Use default export so it can be easily imported into the page
41-
export default ButtonGoOrganizationDashboard;
21+
}

client/src/pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// src/pages/index.tsx
33

44
import ButtonGoUserDashboard from "../components/ui/button_go_user_dashboard";
5-
import ButtonGoOrganizationDashboard from "../components/ui/button_go_user_page";
5+
import ButtonGoOrganizationDashboard from "../components/ui/button_go_organization_dashboard";
6+
import ButtonGoUserPage from "../components/ui/button_go_user_page";
67

78
// this is a react functional component
89
// it returns a html element that will render the jsx inside it
@@ -28,6 +29,7 @@ const LandingPage = () => {
2829

2930
<ButtonGoOrganizationDashboard />
3031
<ButtonGoUserDashboard />
32+
<ButtonGoUserPage />
3133
</div>
3234
);
3335
};

client/src/pages/user_page.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1-
// src/pages/organization_dashboard.tsx (Update the import path)
2-
31
import Head from "next/head";
4-
// The Header component is now one directory level up from 'pages',
5-
// so the path is '../components/Header'
6-
//import Header from '../components/Header';
72

83
const DashboardPage = () => {
94
return (
105
<>
116
<Head>
12-
<title>Inventory Dashboard</title>
7+
<title>User Page</title>
138
</Head>
14-
<div className="dashboard-container">
15-
{/* 1. Navigation Bar */}
16-
{/* <Header /> */}
17-
18-
{/* 2. Main content wrapper */}
19-
<main className="dashboard-content">
20-
{/* Components for Statistics, Recent Activity, and Quick Actions */}
21-
<h1>Welcome to the Dashboard!</h1>{" "}
22-
{/* Add a temporary header to confirm it works */}
9+
<div className="user-container">
10+
<main className="user-content">
11+
<h1>Welcome to the Users Page!</h1>{" "}
2312
</main>
2413
</div>
2514
</>
2615
);
2716
};
2817

29-
// export to make the function available to other parts of the app
3018
export default DashboardPage;

0 commit comments

Comments
 (0)