Skip to content

Commit c642b30

Browse files
authored
fix: 영감 없을 때 이미지 구분 (#632)
1 parent cbf3ff4 commit c642b30

8 files changed

+18
-19
lines changed

next.config.js

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// const { withSentryConfig } = require('@sentry/nextjs');
2-
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
3-
// enabled: process.env.ANALYZE === 'true',
4-
// });
1+
const { withSentryConfig } = require('@sentry/nextjs');
2+
const withBundleAnalyzer = require('@next/bundle-analyzer')({
3+
enabled: process.env.ANALYZE === 'true',
4+
});
55
const CompressionPlugin = require('compression-webpack-plugin');
66
const { version } = require('./package.json');
77

@@ -29,14 +29,12 @@ const nextConfig = {
2929
output: 'export',
3030
};
3131

32-
// const sentryWebpackPluginOptions = {
33-
// silent: true,
34-
// authToken: process.env.SENTRY_AUTH_TOKEN,
35-
// };
36-
37-
module.exports = nextConfig;
32+
const sentryWebpackPluginOptions = {
33+
silent: true,
34+
authToken: process.env.SENTRY_AUTH_TOKEN,
35+
};
3836

39-
// module.exports = () => {
40-
// const plugins = [[withSentryConfig, sentryWebpackPluginOptions], [withBundleAnalyzer]];
41-
// return plugins.reduce((acc, cur) => cur[0](acc, cur[1] ?? undefined), nextConfig);
42-
// };
37+
module.exports = () => {
38+
const plugins = [[withSentryConfig, sentryWebpackPluginOptions], [withBundleAnalyzer]];
39+
return plugins.reduce((acc, cur) => cur[0](acc, cur[1] ?? undefined), nextConfig);
40+
};

public/InspirationEmpty.webp

48.6 KB
Binary file not shown.

public/InspirationEmptyText.png

-35.4 KB
Binary file not shown.

public/InspirationEmptyText.webp

15.7 KB
Binary file not shown.

public/UserProfile.png

-10.2 KB
Binary file not shown.

public/UserProfile.webp

4.71 KB
Binary file not shown.

src/components/home/ThumbnailContent.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from 'react';
22
import { css, Theme } from '@emotion/react';
33

4-
import { INSPIRATION_EMPTY_IMAGE_SRC } from '~/constants/assets';
4+
import { PREVIEW_NONE_IMAGE_SRC } from '~/constants/assets';
55
import useDidMount from '~/hooks/common/useDidMount';
66
import useOpenGraphImage from '~/hooks/common/useOpenGraphImage';
77
import { textEllipsisCss } from '~/styles/utils';
@@ -36,7 +36,7 @@ function LinkContent({ openGraph }: Pick<ContentThumbnailProps, 'openGraph'>) {
3636
const [og, setOg] = useState<OpenGraphResponse>();
3737
const { src, onImageError } = useOpenGraphImage({
3838
url: og?.url,
39-
image: og?.image || INSPIRATION_EMPTY_IMAGE_SRC,
39+
image: og?.image || PREVIEW_NONE_IMAGE_SRC,
4040
});
4141

4242
useDidMount(() => {

src/constants/assets.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
export const INSPIRATION_EMPTY_IMAGE_SRC = '/insp-empty.webp';
2-
export const INSPIRATION_EMPTY_TEXT_IMAGE_SRC = '/InspirationEmptyText.png';
3-
export const USER_PROFILE_IMAGE_SRC = '/UserProfile.png';
1+
export const PREVIEW_NONE_IMAGE_SRC = '/insp-empty.webp'; // 영감 카드 미리보기가 비어있을 때 보여줄 이미지
2+
export const INSPIRATION_EMPTY_IMAGE_SRC = '/InspirationEmpty.webp'; // 영감이 없을 때 이미지
3+
export const INSPIRATION_EMPTY_TEXT_IMAGE_SRC = '/InspirationEmptyText.webp';
4+
export const USER_PROFILE_IMAGE_SRC = '/UserProfile.webp';
45

56
export const INSPIRATION_MODAL_IMAGE = {
67
1: '/modal_characters/1.png',

0 commit comments

Comments
 (0)