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 }) { export default function WebsiteHeader({ websiteId, title, domain, showLink = false }) {
const header = showLink ? ( const header = showLink ? (
<Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}> <>
<Favicon domain={domain} /> <Favicon domain={domain} />
{title} <Link href="/website/[...id]" as={`/website/${websiteId}/${title}`}>
</Link> {title}
</Link>
</>
) : ( ) : (
<div> <div>
<Favicon domain={domain} /> <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 Checkmark = ({ is_admin }) => (is_admin ? <Icon icon={<Check />} size="medium" /> : null);
const DashboardLink = row => const DashboardLink = row => (
row.is_admin ? null : ( <Link href={`/dashboard/${row.user_id}/${row.username}`}>
<Link href={`/dashboard/${row.user_id}/${row.username}`}> <a>
<a> <Icon icon={<LinkIcon />} />
<Icon icon={<LinkIcon />} /> </a>
</a> </Link>
</Link> );
);
const Buttons = row => const Buttons = row =>
row.username !== 'admin' ? ( row.username !== 'admin' ? (