File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
101import 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+ }
Original file line number Diff line number Diff line change 11// this is the path to this page
22// src/pages/index.tsx
33
4- import ButtonGoOrganizationDashboard from "../components/ui/button_go_user_page" ;
4+ import ButtonGoOrganizationDashboard from "../components/ui/button_go_organization_dashboard" ;
5+ import ButtonGoUserPage from "../components/ui/button_go_user_page" ;
56
67// this is a react functional component
78// it returns a html element that will render the jsx inside it
@@ -26,6 +27,7 @@ const LandingPage = () => {
2627 */ }
2728
2829 < ButtonGoOrganizationDashboard />
30+ < ButtonGoUserPage />
2931 </ div >
3032 ) ;
3133} ;
Original file line number Diff line number Diff line change 1- // src/pages/organization_dashboard.tsx (Update the import path)
2-
31import 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
83const 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
3018export default DashboardPage ;
You can’t perform that action at this time.
0 commit comments