Bug fixes.

This commit is contained in:
Mike Cao 2021-01-20 19:11:36 -08:00
parent 13dddb3764
commit 4217e890fc
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ export default function DropDown({
}
useDocumentClick(e => {
if (!ref.current.contains(e.target)) {
if (!ref.current?.contains(e.target)) {
setShowMenu(false);
}
});

View File

@ -30,7 +30,7 @@ export default function MenuButton({
}
useDocumentClick(e => {
if (!ref.current.contains(e.target)) {
if (!ref.current?.contains(e.target)) {
setShowMenu(false);
}
});

View File

@ -10,7 +10,7 @@ import Arrow from 'assets/arrow-right.svg';
import styles from './WebsiteHeader.module.css';
export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
let TitleHeader = showLink ? (
const header = showLink ? (
<Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}>
<Favicon domain={domain} />
{title}
@ -24,7 +24,7 @@ export default function WebsiteHeader({ websiteId, title, domain, showLink = fal
return (
<PageHeader>
<div className={styles.title}>{TitleHeader}</div>
<div className={styles.title}>{header}</div>
<ActiveUsers className={styles.active} websiteId={websiteId} />
<ButtonLayout align="right">
<RefreshButton websiteId={websiteId} />