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";
3
3
4
4
import Identicon from "react-identicons" ;
5
5
import ReactMarkdown from "react-markdown" ;
6
+ import { useParams } from "react-router-dom" ;
6
7
7
8
import { Card } from "@kleros/ui-components-library" ;
8
9
@@ -224,6 +225,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
224
225
fileURI,
225
226
} ) => {
226
227
const profileLink = `/profile/1/desc/all?address=${ sender } ` ;
228
+ const { id } = useParams ( ) ;
227
229
228
230
const transactionExplorerLink = useMemo ( ( ) => {
229
231
return getTxnExplorerLink ( transactionHash ?? "" ) ;
@@ -258,7 +260,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
258
260
</ BottomLeftContent >
259
261
{ fileURI && fileURI !== "-" ? (
260
262
< FileLinkContainer >
261
- < StyledInternalLink to = { `/attachment/?title=${ "Evidence File" } &url=${ getIpfsUrl ( fileURI ) } ` } >
263
+ < StyledInternalLink to = { `/attachment/?disputeId= ${ id } & title=${ "Evidence File" } &url=${ getIpfsUrl ( fileURI ) } ` } >
262
264
< AttachmentIcon />
263
265
< AttachedFileText />
264
266
</ StyledInternalLink >
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import styled from "styled-components" ;
3
3
4
- import { useNavigate } from "react-router-dom" ;
4
+ import { useNavigate , useSearchParams } from "react-router-dom" ;
5
5
6
6
import { Button } from "@kleros/ui-components-library" ;
7
7
@@ -66,9 +66,11 @@ const StyledButton = styled(Button)`
66
66
67
67
const Header : React . FC < { title : string } > = ( { title } ) => {
68
68
const navigate = useNavigate ( ) ;
69
+ const [ searchParams ] = useSearchParams ( ) ;
70
+ const disputeId = searchParams . get ( "disputeId" ) ;
69
71
70
72
const handleReturn = ( ) => {
71
- navigate ( - 1 ) ;
73
+ navigate ( `/cases/ ${ disputeId } /evidence` ) ;
72
74
} ;
73
75
74
76
return (
You can’t perform that action at this time.
0 commit comments