// @flow import 'scss/component/_header.scss'; import { ENABLE_UI_NOTIFICATIONS, ENABLE_NO_SOURCE_CLAIMS } from 'config'; import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button'; import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; import HeaderMenuLink from 'component/common/header-menu-link'; import Icon from 'component/common/icon'; import NotificationHeaderButton from 'component/headerNotificationButton'; import React from 'react'; import Tooltip from 'component/common/tooltip'; type HeaderMenuButtonProps = { activeChannelStakedLevel: number, authenticated: boolean, automaticDarkModeEnabled: boolean, currentTheme: string, user: ?User, handleThemeToggle: (boolean, string) => void, doOpenModal: (string, {}) => void, odyseeMembership: string, }; export default function HeaderMenuButtons(props: HeaderMenuButtonProps) { const { authenticated, automaticDarkModeEnabled, currentTheme, user, handleThemeToggle, odyseeMembership } = props; const isOnMembershipPage = window.location.pathname === `/$/${PAGES.ODYSEE_MEMBERSHIP}`; const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui); const livestreamEnabled = Boolean(ENABLE_NO_SOURCE_CLAIMS && user && !user.odysee_live_disabled); const uploadProps = { requiresAuth: !authenticated }; return (