Skip to content

Commit

Permalink
Modified catalogue logo and title
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjeevLakhwani committed Dec 19, 2024
1 parent 1869850 commit 2be97db
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/js/components/SiteSider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ import { useLocation, useNavigate } from 'react-router-dom';

import type { MenuProps, SiderProps } from 'antd';
import { Layout, Menu } from 'antd';
import Icon, { PieChartOutlined, SearchOutlined, ShareAltOutlined, SolutionOutlined } from '@ant-design/icons';
import Icon, {
BookOutlined,
PieChartOutlined,
SearchOutlined,
ShareAltOutlined,
SolutionOutlined,
} from '@ant-design/icons';

import BeaconSvg from '@/components/Beacon/BeaconSvg';
import { useSearchQuery } from '@/features/search/hooks';
import { useTranslationFn } from '@/hooks';
import { BentoRoute } from '@/types/routes';
import { buildQueryParamsUrl } from '@/utils/search';
import { getCurrentPage } from '@/utils/router';
import { useMetadata, useSelectedProject } from '@/features/metadata/hooks';

const { Sider } = Layout;

Expand All @@ -30,6 +37,10 @@ const SiteSider: React.FC<{
const t = useTranslationFn();
const { queryParams } = useSearchQuery();
const currentPage = getCurrentPage();
const selectedProject = useSelectedProject();
const { projects } = useMetadata();

const isCataloguePage = useMemo(() => !selectedProject && projects.length > 1, [projects, selectedProject]);

const handleMenuClick: OnClick = useCallback(
({ key }: { key: string }) => {
Expand Down Expand Up @@ -60,7 +71,11 @@ const SiteSider: React.FC<{

const menuItems: MenuItem[] = useMemo(() => {
const items = [
createMenuItem('Overview', BentoRoute.Overview, <PieChartOutlined />),
createMenuItem(
isCataloguePage ? 'Catalogue' : 'Overview',
BentoRoute.Overview,
isCataloguePage ? <BookOutlined /> : <PieChartOutlined />
),
createMenuItem('Search', BentoRoute.Search, <SearchOutlined />),
createMenuItem('Provenance', BentoRoute.Provenance, <SolutionOutlined />),
];
Expand Down

0 comments on commit 2be97db

Please sign in to comment.