Refactor Root component to accept additional props and enhance LyricSearch functionality with URL hash handling and lyrics sanitization.

This commit is contained in:
2025-10-08 15:49:00 -04:00
parent ef4c80450a
commit 4227c21d1f
3 changed files with 38 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ const MediaRequestForm = lazy(() => import('./TRip/MediaRequestForm.jsx'));
const RequestManagement = lazy(() => import('./TRip/RequestManagement.jsx'));
const Player = lazy(() => import('./AudioPlayer.jsx'));
export default function Root({ child, user = undefined }) {
export default function Root({ child, user = undefined, ...props }) {
window.toast = toast;
const theme = document.documentElement.getAttribute("data-theme")
usePrimeReactThemeSwitcher(theme);
@@ -35,7 +35,7 @@ export default function Root({ child, user = undefined }) {
Work in progress... bugs are to be expected.
</Alert> */}
{child == "LoginPage" && (<LoginPage client:only="react" />)}
{child == "LyricSearch" && (<LyricSearch client:only="react" />)}
{child == "LyricSearch" && (<LyricSearch {...props} client:only="react" />)}
{child == "Player" && (<Player client:only="react" user={user} />)}
{child == "Memes" && <Memes client:only="react" />}
{child == "qs2.MediaRequestForm" && <MediaRequestForm client:only="react" />}