mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Extract themeEngine
This commit is contained in:
parent
eb8025791b
commit
c9f42e497a
5 changed files with 30 additions and 28 deletions
|
|
@ -14,7 +14,7 @@ const playButton = (name, url, theme) => (
|
|||
Play "{name}"
|
||||
</Link>)
|
||||
|
||||
export default function ({ themeList, currentTheme, setTheme }) {
|
||||
export default function ({ themeEngine }) {
|
||||
const [targetName, setTargetName] = useState(null)
|
||||
const [targetUrl, setTargetUrl] = useState(null)
|
||||
|
||||
|
|
@ -28,9 +28,7 @@ export default function ({ themeList, currentTheme, setTheme }) {
|
|||
<ul>
|
||||
<li>
|
||||
<ThemeSelector {...{
|
||||
currentTheme,
|
||||
themeList,
|
||||
setTheme
|
||||
themeEngine
|
||||
}} />
|
||||
</li>
|
||||
<li>
|
||||
|
|
@ -47,7 +45,7 @@ export default function ({ themeList, currentTheme, setTheme }) {
|
|||
</li>
|
||||
</ul>
|
||||
{ targetUrl
|
||||
? playButton(targetName, targetUrl, currentTheme)
|
||||
? playButton(targetName, targetUrl, themeEngine.currentTheme)
|
||||
: null }
|
||||
</main>)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue