Add a special class to the app container when the player page is active

This commit is contained in:
He4eT 2021-03-02 04:08:27 +05:00
commit 5b283d2789
6 changed files with 31 additions and 13 deletions

View file

@ -22,3 +22,8 @@ export const useHashLocation = () => {
export const buildPlayLinkHref = (url, theme) =>
`/#/play/${theme}/${encodeURIComponent(url)}`
export const extractView = location => {
const currentView = location.split('/').filter(Boolean)[0]
return currentView || ''
}