Changeset b612ab1 for frontend/src
- Timestamp:
- 08/27/22 14:36:14 (2 years ago)
- Branches:
- master
- Children:
- 717ceae
- Parents:
- 3c90661
- Location:
- frontend/src
- Files:
-
- 49 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/App.css
r3c90661 rb612ab1 1 .App {2 text-align: center;3 }4 5 .App-logo {6 height: 40vmin;7 pointer-events: none;8 }9 10 @media (prefers-reduced-motion: no-preference) {11 .App-logo {12 animation: App-logo-spin infinite 20s linear;13 }14 }15 16 .App-header {17 background-color: #282c34;18 min-height: 100vh;19 display: flex;20 flex-direction: column;21 align-items: center;22 justify-content: center;23 font-size: calc(10px + 2vmin);24 color: white;25 }26 27 .App-link {28 color: #61dafb;29 }30 31 @keyframes App-logo-spin {32 from {33 transform: rotate(0deg);34 }35 to {36 transform: rotate(360deg);37 }38 } -
frontend/src/App.js
r3c90661 rb612ab1 1 import logo from './logo.svg'; 2 import './App.css'; 1 import "./App.css"; 2 import Home from "./screens/HomeWithJumbo"; 3 import ProductScreen from "./screens/ProductScreen"; 4 import Test from "./screens/ProductScreenBootstrap"; 5 import { BrowserRouter, Route, Routes } from "react-router-dom"; 6 import { useContext } from "react"; 7 import { Store } from "./Store"; 8 import Header from "./components/Header"; 9 import Footer from "./components/Footer"; 10 import CartScreen from "./screens/CartScreen"; 11 import CategoryScreen from "./screens/CategoryScreen"; 12 import SigninScreen from "./screens/SigninScreen"; 3 13 4 14 function App() { 15 const { state } = useContext(Store); 16 const { cart } = state; 5 17 return ( 6 <div className="App"> 7 <header className="App-header"> 8 <img src={logo} className="App-logo" alt="logo" /> 9 <p> 10 Edit <code>src/App.js</code> and save to reload. 11 </p> 12 <a 13 className="App-link" 14 href="https://reactjs.org" 15 target="_blank" 16 rel="noopener noreferrer" 17 > 18 Learn React 19 </a> 20 </header> 21 </div> 18 <BrowserRouter> 19 <Header /> 20 21 <Routes> 22 <Route path="/product/:slug" element={<Test />} /> 23 <Route path="/" element={<Home />} /> 24 <Route path="/cart" element={<CartScreen />} /> 25 <Route path="/signin" element={<SigninScreen />} /> 26 <Route path="/products" element={<CategoryScreen />} /> 27 </Routes> 28 29 <Footer /> 30 </BrowserRouter> 22 31 ); 23 32 } -
frontend/src/index.css
r3c90661 rb612ab1 1 body {2 margin: 0;3 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',4 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',5 sans-serif;6 -webkit-font-smoothing: antialiased;7 -moz-osx-font-smoothing: grayscale;8 }9 10 code {11 font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',12 monospace;13 } -
frontend/src/index.js
r3c90661 rb612ab1 1 import React from 'react'; 2 import ReactDOM from 'react-dom/client'; 3 import './index.css'; 4 import App from './App'; 5 import reportWebVitals from './reportWebVitals'; 1 import React from "react"; 2 import ReactDOM from "react-dom/client"; 3 import { HelmetProvider } from "react-helmet-async"; 4 import "./index.css"; 5 import App from "./App"; 6 import reportWebVitals from "./reportWebVitals"; 7 import { StoreProvider } from "./Store"; 6 8 7 const root = ReactDOM.createRoot(document.getElementById( 'root'));9 const root = ReactDOM.createRoot(document.getElementById("root")); 8 10 root.render( 9 11 <React.StrictMode> 10 <App /> 12 <StoreProvider> 13 <HelmetProvider> 14 <App /> 15 </HelmetProvider> 16 </StoreProvider> 11 17 </React.StrictMode> 12 18 );
Note:
See TracChangeset
for help on using the changeset viewer.