Skip to content

Commit

Permalink
fix: fw-433 could fail to load image from infura-ipfs.io gateway (#11430
Browse files Browse the repository at this point in the history
)
  • Loading branch information
swkatmask authored Feb 23, 2024
1 parent e85eaa7 commit dcc2a93
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jira-issue-key-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
if: ${{ github.event.pull_request }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jira-prefix: 'MF'
jira-prefix: 'MF|FW'
1 change: 1 addition & 0 deletions packages/plugins/Calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@masknet/shared-base-ui": "workspace:^",
"@masknet/theme": "workspace:^",
"@masknet/web3-providers": "workspace:^",
"@masknet/web3-shared-base": "workspace:^",
"date-fns": "^2.30.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EmptyStatus, LoadingStatus } from '@masknet/shared'
import { EmptyStatus, Image, LoadingStatus } from '@masknet/shared'
import { makeStyles } from '@masknet/theme'
import { resolveIPFS_URL } from '@masknet/web3-shared-base'
import { Link, Typography } from '@mui/material'
import { format } from 'date-fns'
import { useCallback, useMemo } from 'react'
Expand Down Expand Up @@ -67,9 +68,8 @@ const useStyles = makeStyles()((theme) => ({
lineHeight: '16px',
},
logo: {
width: '24px',
height: '24px',
borderRadius: '50%',
overflow: 'hidden',
},
eventTitle: {
fontSize: '14px',
Expand Down Expand Up @@ -144,7 +144,12 @@ export function EventList({ list, isLoading, empty, dateString }: EventListProps
target="_blank">
<div className={classes.eventHeader}>
<div className={classes.projectWrap}>
<img src={v.project.logo} className={classes.logo} alt="logo" />
<Image
src={resolveIPFS_URL(v.project.logo)}
classes={{ container: classes.logo }}
size={24}
alt={v.project.name}
/>
<Typography className={classes.projectName}>
{v.project.name}
</Typography>
Expand Down
12 changes: 8 additions & 4 deletions packages/plugins/Calendar/src/SiteAdaptor/components/NFTList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Icons } from '@masknet/icons'
import { EmptyStatus, LoadingStatus } from '@masknet/shared'
import { EmptyStatus, LoadingStatus, Image } from '@masknet/shared'
import { makeStyles } from '@masknet/theme'
import { IconButton, Link, Typography } from '@mui/material'
import { format } from 'date-fns'
Expand Down Expand Up @@ -72,9 +72,8 @@ const useStyles = makeStyles()((theme) => ({
lineHeight: '16px',
},
logo: {
width: '24px',
height: '24px',
borderRadius: '50%',
overflow: 'hidden',
},
eventTitle: {
fontSize: '14px',
Expand Down Expand Up @@ -168,7 +167,12 @@ export function NFTList({ list, isLoading, empty, dateString }: NFTListProps) {
target="_blank">
<div className={classes.eventHeader}>
<div className={classes.projectWrap}>
<img src={v.project.logo} className={classes.logo} alt="logo" />
<Image
src={v.project.logo}
classes={{ container: classes.logo }}
size={24}
alt={v.project.name}
/>
<Typography className={classes.projectName}>
{v.project.name}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EmptyStatus, LoadingStatus } from '@masknet/shared'
import { EmptyStatus, LoadingStatus, Image } from '@masknet/shared'
import { makeStyles } from '@masknet/theme'
import { Link, Typography } from '@mui/material'
import { format } from 'date-fns'
Expand Down Expand Up @@ -69,9 +69,8 @@ const useStyles = makeStyles()((theme) => ({
lineHeight: '16px',
},
logo: {
width: '24px',
height: '24px',
borderRadius: '50%',
overflow: 'hidden',
},
eventTitle: {
fontSize: '14px',
Expand Down Expand Up @@ -152,9 +151,10 @@ export function NewsList({ list, isLoading, empty, dateString }: NewsListProps)
target="_blank">
<div className={classes.eventHeader}>
<div className={classes.projectWrap}>
<img
<Image
src={v.project.logo}
className={classes.logo}
classes={{ container: classes.logo }}
size={24}
alt={v.project.name}
/>
<Typography className={classes.projectName}>
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dcc2a93

Please sign in to comment.