Skip to content

Commit 247e6f2

Browse files
committed
add basic files for some comp and structure
1 parent 124384e commit 247e6f2

File tree

12 files changed

+237
-0
lines changed

12 files changed

+237
-0
lines changed

dao-frontend/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

dao-frontend/Wrapper.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import './index.css';
2+
import App from './App';
3+
import Home from './pages/Home';
4+
import Navbar from './components/Navbar';
5+
import {Routes, Route, BrowserRouter} from 'react-router-dom';
6+
import {useState} from 'react';
7+
8+
export default function Wrapper(){
9+
return(
10+
11+
<div className='' >
12+
<Navbar />
13+
14+
<BrowserRouter>
15+
<Routes>
16+
{/* HOME PAGE */}
17+
<Route path="/" element={<Home/>} />
18+
<Route path="/home" element={<Home/>} />
19+
<Route path="/app" element={<App />} />
20+
21+
</Routes>
22+
</BrowserRouter>
23+
</div>
24+
25+
26+
27+
28+
);
29+
}

dao-frontend/src/App.css

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
}

dao-frontend/src/App.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import logo from './logo.svg';
2+
import './App.css';
3+
4+
function App() {
5+
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>
22+
);
23+
}
24+
25+
export default App;

dao-frontend/src/App.test.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { render, screen } from '@testing-library/react';
2+
import App from './App';
3+
4+
test('renders learn react link', () => {
5+
render(<App />);
6+
const linkElement = screen.getByText(/learn react/i);
7+
expect(linkElement).toBeInTheDocument();
8+
});

dao-frontend/src/components/Navbar.js

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import React from 'react';
2+
import Logo from './Logo';
3+
import { FaGithub } from 'react-icons/fa';
4+
import { useState } from 'react';
5+
const nav_items = [
6+
{
7+
name: 'Home',
8+
path: '/'
9+
},
10+
{
11+
name: 'About',
12+
path: '#features',
13+
},
14+
{
15+
name: 'docs',
16+
path: '/docs',
17+
},
18+
// {
19+
// name: 'FAQ',
20+
// path: '#faq',
21+
// }
22+
];
23+
24+
25+
export default function Navbar(props) {
26+
const [isOpen, setIsOpen] = useState('');
27+
28+
const toggle = () => {
29+
setIsOpen(isOpen === '' ? 'hidden' : '');
30+
}
31+
return (
32+
<nav className=" px-2 sm:px-4 py-2.5 text-white">
33+
<div className="container flex flex-wrap justify-between items-center mx-auto">
34+
<a href="https://seam.money" className="flex items-center">
35+
<Logo/>
36+
</a>
37+
<button data-collapse-toggle="mobile-menu" type="button" onClick={() => toggle()} className="inline-flex items-center p-2 ml-3 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="mobile-menu" aria-expanded="false">
38+
<span className="sr-only">Open main menu</span>
39+
<svg className="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg>
40+
<svg className="hidden w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
41+
</button>
42+
<div className={`${isOpen} w-full md:block md:w-auto items-center`} id="mobile-menu">
43+
<ul className="flex flex-col items-center mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
44+
45+
{nav_items.map((item, i) => (
46+
<li className='block py-2 pr-4 pl-3 text-white hover:bg-white hover:text-blac rounded-lg' >
47+
<a href={item.path} className=" ">{item.name}</a>
48+
</li>
49+
))}
50+
<h3>
51+
<p className="text-white text-3xl p-2 m-3 rounded-xl hover:bg-white hover:text-blac ">
52+
<FaGithub className=" hover:text-blac " />
53+
</p>
54+
</h3>
55+
<a href="app">
56+
<button className='bg-transparent m-2 hover:bg-white font-semibold outline outline-2 hover:text-blac text-white py-2 px-4 rounded-2xl'>
57+
Launch app
58+
</button>
59+
</a>
60+
</ul>
61+
</div>
62+
</div>
63+
</nav>
64+
);
65+
}

dao-frontend/src/index.css

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}

dao-frontend/src/index.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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';
6+
7+
const root = ReactDOM.createRoot(document.getElementById('root'));
8+
root.render(
9+
<React.StrictMode>
10+
<App />
11+
</React.StrictMode>
12+
);
13+
14+
// If you want to start measuring performance in your app, pass a function
15+
// to log results (for example: reportWebVitals(console.log))
16+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17+
reportWebVitals();

dao-frontend/src/logo.svg

+1
Loading

dao-frontend/src/pages/Home.js

Whitespace-only changes.

dao-frontend/src/reportWebVitals.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const reportWebVitals = onPerfEntry => {
2+
if (onPerfEntry && onPerfEntry instanceof Function) {
3+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4+
getCLS(onPerfEntry);
5+
getFID(onPerfEntry);
6+
getFCP(onPerfEntry);
7+
getLCP(onPerfEntry);
8+
getTTFB(onPerfEntry);
9+
});
10+
}
11+
};
12+
13+
export default reportWebVitals;

dao-frontend/src/setupTests.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
2+
// allows you to do things like:
3+
// expect(element).toHaveTextContent(/react/i)
4+
// learn more: https://github.com/testing-library/jest-dom
5+
import '@testing-library/jest-dom';

0 commit comments

Comments
 (0)