Skip to content

Commit

Permalink
First crack at pages, components, App, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniferEinstein committed Nov 4, 2023
0 parents commit d326044
Show file tree
Hide file tree
Showing 18 changed files with 189 additions and 0 deletions.
Empty file added components/Footer.js
Empty file.
Empty file added components/Header.js
Empty file.
Empty file added components/Navbar.js
Empty file.
Empty file added pages/About.js
Empty file.
Empty file added pages/AllEvents.js
Empty file.
Empty file added pages/CurrentEvent.js
Empty file.
Empty file added pages/Gallery.js
Empty file.
13 changes: 13 additions & 0 deletions pages/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

function Home() {
return (
<div>
<h1>Home Page for To:From:</h1>


</div>
);
}

export default Home;
11 changes: 11 additions & 0 deletions pages/Index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import App from './App';

ReactDOM.render(
<BrowserRouter>
<App />
</BrowserRouter>,
document.getElementById('root')
);
Empty file added pages/PageNotFound.js
Empty file.
Empty file added pages/Profile.js
Empty file.
Empty file added pages/SignupLogin.js
Empty file.
43 changes: 43 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
38 changes: 38 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
46 changes: 46 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// DEPENDENCIES
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import './App.css';

/* Import all page components here */
import Home from './pages/Home';
import About from './pages/About';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import Heeader from './components/Header'
import SignupLogin from '../pages/SignupLogin';
import AllEvents from '../pages/AllEvents';
import CurrentEvent from '../pages/CurrentEvent';
import Gallery from '../pages/Gallery';
import Profile from '../pages/Profile';
import Account from '../pages/Account';
import PageNotFound from "../pages/PageNotFound";

function App() {
return (
<div className="App">
<header className="App-header">
</header>
<Router>
<Navbar />
<main>
<Routes>
<Route path="/" element={ <Home />} />
<Route path="/about" element = { <About /> } />
<Route path='/signup' element = { <SignupLogin /> } />
<Route path="/events" element = { <AllEvents /> } />
<Route path="/currentevent" element = { <CurrentEvent /> } />
<Route path="/gallery" element = { <Gallery /> } />
<Route path="/allevents" element = { <AllEvents /> } />
<Route path="/profile" element = { <Profile /> } />
<Route path="/account" element = { <Account /> } />
<Route path="*" element = { <PageNotFound /> } />
</Routes>
</main>
</Router>

</div>
);
}

export default App;
8 changes: 8 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
13 changes: 13 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
17 changes: 17 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

0 comments on commit d326044

Please sign in to comment.