added homepage condition for channel select

This commit is contained in:
sektordv 2021-06-14 18:48:22 +02:00
parent 4f39e75f2d
commit 509590e400

View file

@ -137,6 +137,8 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
setChannel setChannel
} = useAppChannel(false); } = useAppChannel(false);
const isHomepage = location.pathname === "/";
const menuStructure = createMenuStructure(intl); const menuStructure = createMenuStructure(intl);
const configurationMenu = createConfigurationMenu(intl); const configurationMenu = createConfigurationMenu(intl);
const userPermissions = user?.userPermissions || []; const userPermissions = user?.userPermissions || [];
@ -216,7 +218,7 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
.includes("mac")} .includes("mac")}
onClick={() => setNavigatorVisibility(true)} onClick={() => setNavigatorVisibility(true)}
/> />
{channel && ( {channel && isHomepage && (
<AppChannelSelect <AppChannelSelect
channels={availableChannels} channels={availableChannels}
disabled={!isPickerActive} disabled={!isPickerActive}