Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: login and signup forms, params recuparation, home page and links #1

Merged
merged 18 commits into from
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: login and signup forms and params recuparation
  • Loading branch information
adrienfort committed May 5, 2021
commit 3b879e145a9f64fccd9f2b5cd58082e9eaa91a72
185 changes: 185 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"js-file-download": "^0.4.12",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.1"
},
Expand Down
19 changes: 19 additions & 0 deletions src/app/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.app {
min-height: 100vh;
}

.signup-route {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
min-height: 80vh;
}

.login-route {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
min-height: 80vh;
}
34 changes: 27 additions & 7 deletions src/app/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useState } from 'react';
import { BrowserRouter, Route } from 'react-router-dom';
import UploadButton from '../components/button/UploadButton.js';
import {DownloadButton} from "../components/button/DownloadButton";
import {DownloadButton} from '../components/button/DownloadButton';
import {Signup} from '../components/forms/Signup';
import {Login} from '../components/forms/Login';
import './App.css';

const IPFS = require('ipfs-http-client');

Expand All @@ -9,12 +13,28 @@ function App() {
const [fileHash, setFileHash] = useState("");

return (
<div className="App">
<h1>Inter Planetary Cloud</h1>
<h3>Upload a file</h3>
<UploadButton ipfs={ipfs} setFileHash={setFileHash}/>
{fileHash ? <div id="success">{'Success: ' + fileHash}</div> : null}
<DownloadButton ipfs={ipfs}/>
<div className="app">
<BrowserRouter>
<Route path="/signup">
<div className="signup-route">
<h3>Inter Planetary Cloud</h3>
<Signup></Signup>
</div>
</Route>
<Route path="/login">
<div className="login-route">
<h3>Inter Planetary Cloud</h3>
<Login></Login>
</div>
</Route>
<Route path="/dashboard">
<h1>Inter Planetary Cloud</h1>
<h3>Upload a file</h3>
<UploadButton ipfs={ipfs} setFileHash={setFileHash}/>
{fileHash ? <div id="success">{'Success: ' + fileHash}</div> : null}
<DownloadButton ipfs={ipfs}/>
</Route>
</BrowserRouter>
</div>
);
}
Expand Down
Loading