Interim Commit
This commit is contained in:
parent
7116a27c74
commit
d69b6bef0c
12 changed files with 258 additions and 198 deletions
|
|
@ -14,8 +14,8 @@ export default () => {
|
|||
<NavBar />
|
||||
<div style={{ paddingTop: `${3.5}em` }} />
|
||||
<Route exact path="/" component={UrlShortener} />
|
||||
<Route exact path="/img" component={ImageUpload} />
|
||||
<Route exact path="/paste" component={TextUpload} />
|
||||
<Route exact path="/i" component={ImageUpload} />
|
||||
<Route exact path="/p" component={TextUpload} />
|
||||
</Router>
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root'),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default () => {
|
|||
required
|
||||
id="image"
|
||||
accept="image/*"
|
||||
label={(state.file && state.file.name) || 'Choose an Image..'}
|
||||
label={(state.file && state.file.name) || 'Select Image (Max: 50MB)'}
|
||||
onChange={(evt) => setState({ ...state, file: evt.target.files[0] })}
|
||||
/>
|
||||
<InputGroup.Append>
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export default () => {
|
|||
putTxtHandler(state).then((data) => {
|
||||
setState({
|
||||
...state,
|
||||
result: `http://${window.location.host}/paste?id=${data}`,
|
||||
result: `http://${window.location.host}/p?id=${data}`,
|
||||
loading: false,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default () => {
|
|||
putUrlHandler(state.url).then((data) => {
|
||||
setState({
|
||||
...state,
|
||||
result: `http://${window.location.host}/u/${data}`.replace('5000', '3000'),
|
||||
result: `${window.location.origin}/${data}`.replace('5000', '3000'),
|
||||
loading: false,
|
||||
error: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import NavLinkItem from './NavLinkItem';
|
|||
|
||||
export default () => (
|
||||
<Navbar expand="lg" collapseOnSelect bg="dark" variant="dark" fixed="top">
|
||||
<Navbar.Brand>oitsjustjo.se</Navbar.Brand>
|
||||
<Navbar.Brand>{window.location.origin.substr(window.location.origin.indexOf('//') + 2)}</Navbar.Brand>
|
||||
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
|
||||
<Navbar.Collapse>
|
||||
<Nav className="mr-auto">
|
||||
<NavLinkItem name="URL" dest="/" icon={faLink} />
|
||||
<NavLinkItem name="Img" dest="/img" icon={faImage} />
|
||||
<NavLinkItem name="Paste" dest="/paste" icon={faCode} />
|
||||
<NavLinkItem name="Paste" dest="/p" icon={faCode} />
|
||||
<NavLinkItem name="Img" dest="/i" icon={faImage} />
|
||||
</Nav>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
|
|
|
|||
Loading…
Reference in a new issue