fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -42,7 +42,11 @@ export default function ProfileNavigation() {
|
||||
}>().props;
|
||||
if (!profileAccess) return null;
|
||||
const links = profileLinks(profileAccess);
|
||||
const workHrefs = [profileAccess.mine, profileAccess.create, profileAccess.review].filter(Boolean);
|
||||
const workHrefs = [
|
||||
profileAccess.mine,
|
||||
profileAccess.create,
|
||||
profileAccess.review,
|
||||
].filter(Boolean);
|
||||
const work = links.filter((link) => workHrefs.includes(link.href));
|
||||
const access = links.filter((link) => !workHrefs.includes(link.href));
|
||||
return (
|
||||
@@ -55,12 +59,24 @@ export default function ProfileNavigation() {
|
||||
{link.title}
|
||||
</Link>
|
||||
))}
|
||||
{access.length > 0 && <details className="basis-full">
|
||||
<summary className="cursor-pointer font-medium">O meu acesso e administração</summary>
|
||||
<div className="mt-3 flex flex-wrap gap-4">{access.map((link) =>
|
||||
<Link key={link.href} href={link.href} className="underline">{link.title}</Link>
|
||||
)}</div>
|
||||
</details>}
|
||||
{access.length > 0 && (
|
||||
<details className="basis-full">
|
||||
<summary className="cursor-pointer font-medium">
|
||||
O meu acesso e administração
|
||||
</summary>
|
||||
<div className="mt-3 flex flex-wrap gap-4">
|
||||
{access.map((link) => (
|
||||
<Link
|
||||
key={link.href}
|
||||
href={link.href}
|
||||
className="underline"
|
||||
>
|
||||
{link.title}
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</details>
|
||||
)}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user