Commit 36dfd57f authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: hide edit button for not-yet-approved items

parent d614440b
Pipeline #179905 passed with stages
in 11 minutes and 47 seconds
......@@ -101,6 +101,17 @@ export default function ItemLayout({
</div>
<ProtectedView>
<div className="flex flex-col space-y-2 xl:flex-row xl:space-y-0 xl:space-x-4">
{item.status === 'approved' ? (
<Link
href={{
pathname: `/${item.category}/${item.persistentId}/edit`,
}}
>
<a className="w-32 px-6 py-3 text-lg text-center text-white transition rounded lg:text-xl lg:w-48 lg:px-10 lg:py-4 bg-primary-750 hover:bg-secondary-600">
Edit
</a>
</Link>
) : null}
<Link
href={{
pathname: `/${item.category}/${item.persistentId}/history`,
......@@ -110,15 +121,6 @@ export default function ItemLayout({
History
</a>
</Link>
<Link
href={{
pathname: `/${item.category}/${item.persistentId}/edit`,
}}
>
<a className="w-32 px-6 py-3 text-lg text-center text-white transition rounded lg:text-xl lg:w-48 lg:px-10 lg:py-4 bg-primary-750 hover:bg-secondary-600">
Edit
</a>
</Link>
</div>
</ProtectedView>
</HStack>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment