Skip to content

Commit

Permalink
use webp cloud for douban image
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Aug 26, 2023
1 parent ed5a0f4 commit 085a90c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/pages/resource/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export function Info(props: InfoPropTypes) {
};

const classes = useStyles();
const getDoubanPoster = () => {
const webpcloud = "https://3297e64.webp.ee";
return `${webpcloud}/api/douban?resource_id=${id}&type=image`;
};

return (
<div>
Expand Down Expand Up @@ -201,7 +205,7 @@ export function Info(props: InfoPropTypes) {
<Link href={doubanInfo.doubanLink} target="_blank">
<div
style={{
backgroundImage: `url(${process.env.REACT_APP_TAURI || ""}/api/douban?resource_id=${id}&type=image)`,
backgroundImage: `url(${getDoubanPoster()})`,
}}
className={classes.post}
/>
Expand Down

0 comments on commit 085a90c

Please sign in to comment.