Skip to content

Commit

Permalink
refactor: upcoming exhibitions
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrobertbrooks committed Nov 28, 2024
1 parent af76a15 commit d99e117
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
13 changes: 9 additions & 4 deletions src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import {
DropdownMenu,
DropdownItem,
} from 'reactstrap';
import { SITE_HAS_GLOBAL_BANNER } from '../../consts';
import {
SITE_HAS_GLOBAL_BANNER,
SITE_HAS_UPCOMING_EXHIBITIONS,
} from '../../consts';
import { usePrevious } from '../../hooks';
import {
Link,
Expand Down Expand Up @@ -110,9 +113,11 @@ export const Header = () => {
<DropdownItemNavLink to={Url.CollectionPage}>
Collection
</DropdownItemNavLink>
<DropdownItemNavLink to={Url.ExhibitionsPage}>
Exhibitions
</DropdownItemNavLink>
{SITE_HAS_UPCOMING_EXHIBITIONS && (
<DropdownItemNavLink to={Url.ExhibitionsPage}>
Exhibitions
</DropdownItemNavLink>
)}
<DropdownItemNavLink to={Url.PublicationsPage}>
Publications
</DropdownItemNavLink>
Expand Down
2 changes: 2 additions & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export const EMAIL_ADDRESS = '[email protected]';
export const GOOGLE_TAG_MANAGER_ID = 'GTM-M2SX39M';

export const SITE_HAS_GLOBAL_BANNER = false;

export const SITE_HAS_UPCOMING_EXHIBITIONS = false;
13 changes: 10 additions & 3 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Paragraph,
OutlineButton,
} from './shared';
import { SITE_HAS_UPCOMING_EXHIBITIONS } from 'consts';

export const Home = () => (
<Page className="position-relative p-0" fluid>
Expand Down Expand Up @@ -62,9 +63,15 @@ export const Home = () => (
</Button>
</Col>
<Col sm={6} xl={4}>
<Button to={Url.PublicationsPage} block>
Publications
</Button>
{SITE_HAS_UPCOMING_EXHIBITIONS ? (
<Button to={Url.ExhibitionsPage} block>
Exhibition
</Button>
) : (
<Button to={Url.PublicationsPage} block>
Publications
</Button>
)}
</Col>
<Col xl={2} />
</Row>
Expand Down

0 comments on commit d99e117

Please sign in to comment.