mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 14:19:56 -05:00
A new start
Signed-off-by: Roland <roland@learningselfreliance.com>
This commit is contained in:
commit
9b899f6fc0
135 changed files with 15764 additions and 0 deletions
60
app/src/App.js
Normal file
60
app/src/App.js
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import React from 'react';
|
||||
import './App.css';
|
||||
import {NavBar} from "./components/Nav";
|
||||
import {Route, Switch} from "react-router-dom";
|
||||
import {FavoriteVideosPreview, VideosRoute, VideoWrapper, ViewedVideosPreview} from "./components/Videos";
|
||||
import Admin from "./components/Admin";
|
||||
import {Container, Header, Segment} from "semantic-ui-react";
|
||||
import 'semantic-ui-offline/semantic.min.css';
|
||||
import {SemanticToastContainer} from 'react-semantic-toasts';
|
||||
import 'react-semantic-toasts/styles/react-semantic-alert.css';
|
||||
import {AppsRoute} from "./components/Apps";
|
||||
import {InventoryRoute} from "./components/Inventory";
|
||||
import {ArchiveRoute} from "./components/Archive";
|
||||
|
||||
function Welcome() {
|
||||
return (
|
||||
<Container style={{marginTop: '2em'}}>
|
||||
<Header as="h1">Welcome to WROLPi!</Header>
|
||||
<h3>
|
||||
Take your internet, off-grid.
|
||||
</h3>
|
||||
<Segment>
|
||||
<FavoriteVideosPreview/>
|
||||
</Segment>
|
||||
<Segment>
|
||||
<ViewedVideosPreview/>
|
||||
</Segment>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
function PageNotFound() {
|
||||
return (
|
||||
<Container>
|
||||
<h1 className="display-4">Page Not Found!</h1>
|
||||
<p>The page you requested cannot be found</p>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
<NavBar/>
|
||||
</header>
|
||||
<Switch>
|
||||
<Route path='/videos/channel/:channel_link/video/:video_id' exact component={VideoWrapper}/>
|
||||
<Route path="/" exact={true} component={Welcome}/>
|
||||
<Route path="/videos" component={VideosRoute}/>
|
||||
<Route path="/admin" component={Admin}/>
|
||||
<Route path="/apps" component={AppsRoute}/>
|
||||
<Route path="/inventory" component={InventoryRoute}/>
|
||||
<Route path='/archive' component={ArchiveRoute}/>
|
||||
<Route component={PageNotFound}/>
|
||||
</Switch>
|
||||
<SemanticToastContainer position="top-right"/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue