mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Home view
This commit is contained in:
parent
19e051045d
commit
c48d6ec305
3 changed files with 15 additions and 7 deletions
|
|
@ -6,25 +6,32 @@ import { Link } from 'wouter-preact'
|
|||
import FileSelector from '~/src/components/FileSelector'
|
||||
import URLSelector from '~/src/components/URLSelector'
|
||||
|
||||
import { buildPlayLinkHref } from '~/src/utils/utils.routing'
|
||||
|
||||
export default function () {
|
||||
const [targetName, setTargetName] = useState(null)
|
||||
const [targetURL, setTargetURL] = useState(null)
|
||||
|
||||
const playButton = (
|
||||
<Link href={`/#/play/default/${encodeURIComponent(targetURL)}`}>
|
||||
<Link href={buildPlayLinkHref(targetURL)}>
|
||||
Play "{targetName}"
|
||||
</Link>)
|
||||
|
||||
return (
|
||||
<main>
|
||||
<p>
|
||||
You can browse some <Link href='/top100'>
|
||||
games from IFDB
|
||||
</Link> or play a game from a file.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<URLSelector
|
||||
<FileSelector
|
||||
emitName={setTargetName}
|
||||
emitURL={setTargetURL} />
|
||||
</li>
|
||||
<li>
|
||||
<FileSelector
|
||||
<URLSelector
|
||||
emitName={setTargetName}
|
||||
emitURL={setTargetURL} />
|
||||
</li>
|
||||
Loading…
Add table
Add a link
Reference in a new issue