Skip to content

Commit

Permalink
Remove pixiv.cat
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Apr 7, 2020
1 parent 101d3ce commit 6149e9b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const Item: React.SFC<IItemProps> = props => {

const onImageError = () => {
if (imgRef.current) {
imgRef.current.src = require('@/images/img-fail.jpg');
imgRef.current.src = require('@/images/img-fail.jpg').default;
}

props?.masonry?.performLayout();
Expand Down
1 change: 0 additions & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default {
commentsURI: '/illust/comments',
authURI: '/user/auth',
favouriteURI: '/favourite',
proxyImageURI: 'https://i.pixiv.cat',
baseURL: 'https://pixiv.moe/',
trackingID: 'UA-70944432-2',
projectLink: 'https://github.com/LoveLiveSunshine/pixiv.moe',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getProxyImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import config from '@/config';
export default function getProxyImage(url: string) {
const regex = /^http?s:\/\/i\.pximg\.net/i;
if (regex.test(url)) {
return `${config.proxyImageURI}${url.replace(regex, '')}`;
return `${config.apiBaseURL}/image/${url.replace(/^http?s:\/\//, '')}`;
}
return url;
}

0 comments on commit 6149e9b

Please sign in to comment.