Skip to content

Commit

Permalink
Show dashboard for multiple admins.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Feb 2, 2021
1 parent b1d8a58 commit 88452ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
8 changes: 5 additions & 3 deletions components/metrics/WebsiteHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
15 changes: 7 additions & 8 deletions components/settings/AccountSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ? (
Expand Down

0 comments on commit 88452ad

Please sign in to comment.