feat: title
This commit is contained in:
parent
5b74605f49
commit
de82c7a3f2
|
@ -19,7 +19,9 @@
|
|||
docker: 'cached',
|
||||
}
|
||||
'@latus/governor': {}
|
||||
'@latus/http': {}
|
||||
'@latus/http': {
|
||||
title: 'Rooted',
|
||||
}
|
||||
'@latus/http/client': {
|
||||
up: [
|
||||
'@latus/socket/client',
|
||||
|
|
|
@ -16,13 +16,13 @@ const Title = () => (
|
|||
<div className="title">
|
||||
<div className="title__muted">
|
||||
<Switch>
|
||||
{/* <Route path="/title/local">
|
||||
<Local />
|
||||
</Route> */}
|
||||
<Route path="/title/main">
|
||||
<Main />
|
||||
</Route>
|
||||
{/* <Route path="/title/remote">
|
||||
{/* <Route path="/title/local">
|
||||
<Local />
|
||||
</Route>
|
||||
<Route path="/title/remote">
|
||||
<Remote />
|
||||
</Route> */}
|
||||
<Route path={['/title', '/title/*']}>
|
||||
|
|
|
@ -1,22 +1,28 @@
|
|||
import './index.scss';
|
||||
|
||||
import {React} from '@latus/react';
|
||||
import {
|
||||
React,
|
||||
useLatus,
|
||||
} from '@latus/react';
|
||||
import {
|
||||
Link,
|
||||
} from 'react-router-dom';
|
||||
|
||||
const Main = () => (
|
||||
<div className="title-main">
|
||||
<h1 className="title-main__title">Rooted</h1>
|
||||
<ul className="title-main__actions">
|
||||
<li className="title-main__action">
|
||||
<Link to="/title/local" className="button title-main__button">Local play</Link>
|
||||
</li>
|
||||
<li className="title-main__action">
|
||||
<Link to="/title/remote" className="button title-main__button">Remote play</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
const Main = () => {
|
||||
const latus = useLatus();
|
||||
return (
|
||||
<div className="title-main">
|
||||
<h1 className="title-main__title">{latus.get('@latus/http.title')}</h1>
|
||||
<ul className="title-main__actions">
|
||||
<li className="title-main__action">
|
||||
<Link to="/title/local" className="button title-main__button">Local play</Link>
|
||||
</li>
|
||||
<li className="title-main__action">
|
||||
<Link to="/title/remote" className="button title-main__button">Remote play</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Main;
|
||||
|
|
Loading…
Reference in New Issue
Block a user