File tree Expand file tree Collapse file tree 2 files changed +16
-30
lines changed Expand file tree Collapse file tree 2 files changed +16
-30
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2- import { createRoot } from "react-dom/client" ;
3- import { BrowserRouter } from "react-router-dom " ;
4- import App from "./pages/App " ;
2+ import ReactDOM from "react-dom/client" ;
3+ import App from "./pages/App.jsx " ;
4+ import "./index.css " ;
55
6- createRoot ( document . getElementById ( "root" ) ) . render (
7- < BrowserRouter >
6+ ReactDOM . createRoot ( document . getElementById ( "root" ) ) . render (
7+ < React . StrictMode >
88 < App />
9- </ BrowserRouter >
9+ </ React . StrictMode >
1010) ;
Original file line number Diff line number Diff line change 11import React from "react" ;
2- import { Routes , Route , Link } from "react-router-dom" ;
3- import Dashboard from "./Dashboard" ;
4- import Tasks from "./Tasks" ;
5- import AIChat from "./AIChat" ;
2+ import { BrowserRouter , Routes , Route } from "react-router-dom" ;
3+ import Login from "./Login.jsx" ; // ✅ Make sure this file exists in the same folder
4+ import Dashboard from "./Dashboard.jsx" ; // Optional if you have one
65
7- export default function App ( ) {
6+ export default function App ( ) {
87 return (
9- < div >
10- < div className = "appbar" >
11- < img src = "/logo.png" alt = "logo" />
12- < div className = "brand" > FAT-EIBL</ div >
13- < nav style = { { marginLeft :"auto" } } >
14- < Link to = "/" > Dashboard</ Link >
15- < Link to = "/tasks" > Tasks</ Link >
16- < Link to = "/ai" > Hey Vani</ Link >
17- </ nav >
18- </ div >
19- < div className = "container" >
20- < Routes >
21- < Route path = "/" element = { < Dashboard /> } />
22- < Route path = "/login" element = { < Login /> } />
23- < Route path = "/tasks" element = { < Tasks /> } />
24- < Route path = "/ai" element = { < AIChat /> } />
25- </ Routes >
26- </ div >
27- </ div >
8+ < BrowserRouter >
9+ < Routes >
10+ < Route path = "/" element = { < Login /> } />
11+ < Route path = "/dashboard" element = { < Dashboard /> } />
12+ </ Routes >
13+ </ BrowserRouter >
2814 ) ;
2915}
You can’t perform that action at this time.
0 commit comments