Download Easy-Consulting-react/src/App.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 978 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Easy-Consulting-react/src/App.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Easy-Consulting-react/src/App.js
-
curl -L -o App.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Easy-Consulting-react/src/App.js
978 Bytes
| import Home from "../src/component/Home/Home/Home"; | |
| import { Routes, Route } from "react-router-dom"; | |
| import React, { createContext } from "react"; | |
| import About from "./component/Home/About/About"; | |
| import Dashboard from "./component/Dashoboard/Dashboard/Dashboard"; | |
| import LoginModal from "./component/Login/LoginModal"; | |
| import PrivateRoute from "./component/Login/PrivateRoute"; | |
| import NotFound from "./component/NotFound"; | |
| export const UserContext = createContext(); | |
| const App = () => { | |
| return ( | |
| <div> | |
| <Routes> | |
| <Route path="/" element={<Home />} /> | |
| <Route path="/about" element={<About />} /> | |
| <Route path="/login" element={<LoginModal />} /> | |
| <Route | |
| path="/dashboard/*" | |
| element={ | |
| <PrivateRoute redirectTo="/login"> | |
| <Dashboard /> | |
| </PrivateRoute> | |
| } | |
| /> | |
| <Route path="*" element={<NotFound />} /> | |
| </Routes> | |
| </div> | |
| ); | |
| }; | |
| export default App; | |