Skip to content

Commit 53bd71b

Browse files
committed
Add Home to ActionsMenu and show for all users
1 parent 10ff021 commit 53bd71b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

explorer/components/DrawingPage/ActionsMenu.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useCookies } from 'react-cookie'
55
import { Drawing } from '../../types'
66
import { AddTagModal } from './AddTagModal'
77
import { ExportTagsModal } from './ExportTagsModal'
8+
import Link from 'next/link'
89

910
type Action = {
1011
title: string
@@ -32,13 +33,14 @@ export const ActionsMenu: React.FC<{ drawing: Drawing }> = ({ drawing }) => {
3233

3334
return (
3435
<>
35-
<Container title='Actions' onClick={() => setIsActive(!isActive)} isHidden={!actions.length}>
36+
<Container title='Actions' onClick={() => setIsActive(!isActive)}>
3637
<svg viewBox="0 0 24 24">
3738
<circle cx="5" cy="12" r="2" />
3839
<circle cx="12" cy="12" r="2" />
3940
<circle cx="19" cy="12" r="2" />
4041
</svg>
4142
<Popup isActive={isActive}>
43+
<Link href='/'><Item>Home</Item></Link>
4244
{actions.map(action => (
4345
<Item key={action.title} onClick={action.onClick}>{action.title}</Item>
4446
))}
@@ -50,11 +52,10 @@ export const ActionsMenu: React.FC<{ drawing: Drawing }> = ({ drawing }) => {
5052
)
5153
}
5254

53-
const Container = styled.button.attrs({ className: 'Explorer__ActionsMenu__Container'})<{ isHidden: boolean }>`
55+
const Container = styled.button.attrs({ className: 'Explorer__ActionsMenu__Container'})`
5456
${navBarItemStyles}
5557
background: none;
5658
border: 0;
57-
display: ${o => o.isHidden && 'none'};
5859
5960
svg {
6061
display: block;

0 commit comments

Comments
 (0)