Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: simplify policy display in request page by removing redunda… #177

Open
wants to merge 1 commit into
base: testnets
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions src/app/[pohid]/[chain]/[request]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Address } from "viem";
import ActionBar from "./ActionBar";
import Evidence from "./Evidence";
import Info from "./Info";
import DocumentIcon from "components/DocumentIcon";

interface PageProps {
params: { pohid: string; chain: string; request: string };
Expand Down Expand Up @@ -435,31 +436,11 @@ export default async function Request({ params }: PageProps) {
<div className="flex grid w-full flex-col justify-items-end font-normal md:flex-row md:items-end">
<Link
href={`/attachment?url=${ipfs(policyLink)}`}
className="text-primaryText ml-2"
className="flex justify-center items-center text-primaryText ml-2"
>
<DocumentIcon className="fill-orange h-6 w-6"/>
<div className="text-primaryText group relative flex py-[8px]">
<Image
alt="warning"
src="/logo/exclamation.svg"
height={24}
width={24}
/>
&nbsp; Policy in force at submission
<div className="outline-color: #E5E5E5 bg-whiteBackground text-secondaryText invisible absolute left-1/2 z-10 m-4 mx-auto w-[260px] flex-shrink-0 -translate-x-1/2 transform place-content-center content-between rounded-[3px] border-[1px] border-[solid] bg-[var(--Light-Mode-White-background,_#FFF)] p-[8px] text-justify text-[14px] font-normal not-italic leading-[normal] outline-black transition-opacity ease-in-out [box-shadow:0px_2px_3px_0px_rgba(0,_0,_0,_0.06)] group-hover:visible md:w-[400px]">
<span>
This is the policy that was in effect when this
submission was made. Why is this important? Policies
may change over time, and it's crucial to know the
policy that was in force at the time of a submission
before challenging or removing a profile. If you
challenge this submission, this version of the policy
will be enforced by Kleros jurors if the case goes to
arbitration. Also, if you revoke this profile citing
“incorrect submission,” but the submission complied
with this policy, your revocation request may be
rejected, and you may lose your deposit.
</span>
</div>
Relevant Policy
</div>
</Link>
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/components/DocumentIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use client";

import React from "react";
import NoteMajorIcon from "icons/NoteMajor.svg";

export default function DocumentIcon(props: React.SVGProps<SVGElement>) {
return <NoteMajorIcon {...props} />;
}