File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import styled, { css } from "styled-components";
33
44import Identicon from "react-identicons" ;
55import ReactMarkdown from "react-markdown" ;
6+ import { useParams } from "react-router-dom" ;
67
78import { Card } from "@kleros/ui-components-library" ;
89
@@ -224,6 +225,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
224225 fileURI,
225226} ) => {
226227 const profileLink = `/profile/1/desc/all?address=${ sender } ` ;
228+ const { id } = useParams ( ) ;
227229
228230 const transactionExplorerLink = useMemo ( ( ) => {
229231 return getTxnExplorerLink ( transactionHash ?? "" ) ;
@@ -258,7 +260,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
258260 </ BottomLeftContent >
259261 { fileURI && fileURI !== "-" ? (
260262 < FileLinkContainer >
261- < StyledInternalLink to = { `/attachment/?title=${ "Evidence File" } &url=${ getIpfsUrl ( fileURI ) } ` } >
263+ < StyledInternalLink to = { `/attachment/?disputeId= ${ id } & title=${ "Evidence File" } &url=${ getIpfsUrl ( fileURI ) } ` } >
262264 < AttachmentIcon />
263265 < AttachedFileText />
264266 </ StyledInternalLink >
Original file line number Diff line number Diff line change 11import React from "react" ;
22import styled from "styled-components" ;
33
4- import { useNavigate } from "react-router-dom" ;
4+ import { useNavigate , useSearchParams } from "react-router-dom" ;
55
66import { Button } from "@kleros/ui-components-library" ;
77
@@ -66,9 +66,11 @@ const StyledButton = styled(Button)`
6666
6767const Header : React . FC < { title : string } > = ( { title } ) => {
6868 const navigate = useNavigate ( ) ;
69+ const [ searchParams ] = useSearchParams ( ) ;
70+ const disputeId = searchParams . get ( "disputeId" ) ;
6971
7072 const handleReturn = ( ) => {
71- navigate ( - 1 ) ;
73+ navigate ( `/cases/ ${ disputeId } /evidence` ) ;
7274 } ;
7375
7476 return (
You can’t perform that action at this time.
0 commit comments