Show dashboard for multiple admins.

This commit is contained in:
Mike Cao 2021-02-01 23:00:12 -08:00
parent b1d8a58e22
commit 88452ad71e
2 changed files with 12 additions and 11 deletions

View File

@ -11,10 +11,12 @@ import styles from './WebsiteHeader.module.css';
export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
const header = showLink ? (
<Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}>
<>
<Favicon domain={domain} />
{title}
</Link>
<Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}>
{title}
</Link>
</>
) : (
<div>
<Favicon domain={domain} />

View File

@ -29,14 +29,13 @@ export default function AccountSettings() {
const Checkmark = ({ is_admin }) => (is_admin ? <Icon icon={<Check />} size="medium" /> : null);
const DashboardLink = row =>
row.is_admin ? null : (
<Link href={`/dashboard/${row.user_id}/${row.username}`}>
<a>
<Icon icon={<LinkIcon />} />
</a>
</Link>
);
const DashboardLink = row => (
<Link href={`/dashboard/${row.user_id}/${row.username}`}>
<a>
<Icon icon={<LinkIcon />} />
</a>
</Link>
);
const Buttons = row =>
row.username !== 'admin' ? (