File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
InformationCards/RegistryInformationCard Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { isUndefined } from "src/utils";
11
11
import { DEFAULT_LIST_LOGO } from "src/consts" ;
12
12
import { getIpfsUrl } from "utils/getIpfsUrl" ;
13
13
import { shortenAddress } from "utils/shortenAddress" ;
14
+ import { Link } from "react-router-dom" ;
14
15
15
16
const TopInfoContainer = styled . div `
16
17
display: flex;
@@ -122,12 +123,14 @@ const TopInfo: React.FC<ITopInfo> = ({
122
123
{ isUndefined ( logoURI ) ? (
123
124
< SkeletonLogo />
124
125
) : (
125
- < StyledLogo
126
- src = { imageSrc }
127
- onError = { ( ) => setImageSrc ( getIpfsUrl ( DEFAULT_LIST_LOGO ) ) }
128
- alt = "List Img"
129
- isListView = { false }
130
- />
126
+ < Link to = { `/attachment/?url=${ imageSrc } ` } >
127
+ < StyledLogo
128
+ src = { imageSrc }
129
+ onError = { ( ) => setImageSrc ( getIpfsUrl ( DEFAULT_LIST_LOGO ) ) }
130
+ alt = "List Img"
131
+ isListView = { false }
132
+ />
133
+ </ Link >
131
134
) }
132
135
{ isUndefined ( title ) ? < SkeletonTitle /> : < StyledTitle > { title } </ StyledTitle > }
133
136
</ LogoAndTitle >
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
+ import { Link } from "react-router-dom" ;
2
3
import styled from "styled-components" ;
3
4
import PDFIcon from "svgs/icons/pdf.svg" ;
4
5
import { getIpfsUrl } from "utils/getIpfsUrl" ;
5
6
6
- const Container = styled . a `
7
+ const Container = styled ( Link ) `
7
8
display: flex;
8
9
gap: 8px;
9
10
` ;
@@ -17,7 +18,7 @@ export interface IFileField {
17
18
const FileField : React . FC < IFileField > = ( { value, label } ) => {
18
19
const fileUrl = getIpfsUrl ( value ) ;
19
20
return (
20
- < Container href = { fileUrl } onClick = { ( event ) => event . stopPropagation ( ) } target = "blank" rel = "noreferrer" >
21
+ < Container to = { `/attachment/?url= ${ fileUrl } ` } onClick = { ( event ) => event . stopPropagation ( ) } >
21
22
< PDFIcon />
22
23
{ label }
23
24
</ Container >
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
+ import { Link } from "react-router-dom" ;
2
3
import styled from "styled-components" ;
3
4
import { getIpfsUrl } from "utils/getIpfsUrl" ;
4
5
@@ -15,7 +16,11 @@ export interface IImageField {
15
16
16
17
const ImageField : React . FC < IImageField > = ( { value, detailed } ) => {
17
18
const imgUrl = getIpfsUrl ( value ) ;
18
- return < StyledImg src = { imgUrl } { ...{ detailed } } /> ;
19
+ return (
20
+ < Link to = { `/attachment/?url=${ imgUrl } ` } >
21
+ < StyledImg src = { imgUrl } { ...{ detailed } } />
22
+ </ Link >
23
+ ) ;
19
24
} ;
20
25
21
26
export default ImageField ;
You can’t perform that action at this time.
0 commit comments