Download react-boilerplate/app/containers/App/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/containers/App/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-boilerplate/app/containers/App/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/containers/App/index.js
1.35 kB
| /** | |
| * | |
| * App | |
| * | |
| * This component is the skeleton around the actual pages, and should only | |
| * contain code that should be seen on all pages. (e.g. navigation bar) | |
| */ | |
| import React from 'react'; | |
| import { Helmet } from 'react-helmet'; | |
| import styled from 'styled-components'; | |
| import { Switch, Route } from 'react-router-dom'; | |
| import HomePage from 'containers/HomePage/Loadable'; | |
| import FeaturePage from 'containers/FeaturePage/Loadable'; | |
| import NotFoundPage from 'containers/NotFoundPage/Loadable'; | |
| import Header from 'components/Header'; | |
| import Footer from 'components/Footer'; | |
| import GlobalStyle from '../../global-styles'; | |
| const AppWrapper = styled.div` | |
| max-width: calc(768px + 16px * 2); | |
| margin: 0 auto; | |
| display: flex; | |
| min-height: 100%; | |
| padding: 0 16px; | |
| flex-direction: column; | |
| `; | |
| export default function App() { | |
| return ( | |
| <AppWrapper> | |
| <Helmet | |
| titleTemplate="%s - React.js Boilerplate" | |
| defaultTitle="React.js Boilerplate" | |
| > | |
| <meta name="description" content="A React.js Boilerplate application" /> | |
| </Helmet> | |
| <Header /> | |
| <Switch> | |
| <Route exact path="/" component={HomePage} /> | |
| <Route path="/features" component={FeaturePage} /> | |
| <Route path="" component={NotFoundPage} /> | |
| </Switch> | |
| <Footer /> | |
| <GlobalStyle /> | |
| </AppWrapper> | |
| ); | |
| } | |