Skip to content

Commit

Permalink
fix: 영감 없을 때 이미지 구분 (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddarkr authored Apr 5, 2024
1 parent cbf3ff4 commit c642b30
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
26 changes: 12 additions & 14 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// const { withSentryConfig } = require('@sentry/nextjs');
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
// enabled: process.env.ANALYZE === 'true',
// });
const { withSentryConfig } = require('@sentry/nextjs');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const CompressionPlugin = require('compression-webpack-plugin');
const { version } = require('./package.json');

Expand Down Expand Up @@ -29,14 +29,12 @@ const nextConfig = {
output: 'export',
};

// const sentryWebpackPluginOptions = {
// silent: true,
// authToken: process.env.SENTRY_AUTH_TOKEN,
// };

module.exports = nextConfig;
const sentryWebpackPluginOptions = {
silent: true,
authToken: process.env.SENTRY_AUTH_TOKEN,
};

// module.exports = () => {
// const plugins = [[withSentryConfig, sentryWebpackPluginOptions], [withBundleAnalyzer]];
// return plugins.reduce((acc, cur) => cur[0](acc, cur[1] ?? undefined), nextConfig);
// };
module.exports = () => {
const plugins = [[withSentryConfig, sentryWebpackPluginOptions], [withBundleAnalyzer]];
return plugins.reduce((acc, cur) => cur[0](acc, cur[1] ?? undefined), nextConfig);
};
Binary file added public/InspirationEmpty.webp
Binary file not shown.
Binary file removed public/InspirationEmptyText.png
Binary file not shown.
Binary file added public/InspirationEmptyText.webp
Binary file not shown.
Binary file removed public/UserProfile.png
Binary file not shown.
Binary file added public/UserProfile.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/home/ThumbnailContent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { css, Theme } from '@emotion/react';

import { INSPIRATION_EMPTY_IMAGE_SRC } from '~/constants/assets';
import { PREVIEW_NONE_IMAGE_SRC } from '~/constants/assets';
import useDidMount from '~/hooks/common/useDidMount';
import useOpenGraphImage from '~/hooks/common/useOpenGraphImage';
import { textEllipsisCss } from '~/styles/utils';
Expand Down Expand Up @@ -36,7 +36,7 @@ function LinkContent({ openGraph }: Pick<ContentThumbnailProps, 'openGraph'>) {
const [og, setOg] = useState<OpenGraphResponse>();
const { src, onImageError } = useOpenGraphImage({
url: og?.url,
image: og?.image || INSPIRATION_EMPTY_IMAGE_SRC,
image: og?.image || PREVIEW_NONE_IMAGE_SRC,
});

useDidMount(() => {
Expand Down
7 changes: 4 additions & 3 deletions src/constants/assets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const INSPIRATION_EMPTY_IMAGE_SRC = '/insp-empty.webp';
export const INSPIRATION_EMPTY_TEXT_IMAGE_SRC = '/InspirationEmptyText.png';
export const USER_PROFILE_IMAGE_SRC = '/UserProfile.png';
export const PREVIEW_NONE_IMAGE_SRC = '/insp-empty.webp'; // 영감 카드 미리보기가 비어있을 때 보여줄 이미지
export const INSPIRATION_EMPTY_IMAGE_SRC = '/InspirationEmpty.webp'; // 영감이 없을 때 이미지
export const INSPIRATION_EMPTY_TEXT_IMAGE_SRC = '/InspirationEmptyText.webp';
export const USER_PROFILE_IMAGE_SRC = '/UserProfile.webp';

export const INSPIRATION_MODAL_IMAGE = {
1: '/modal_characters/1.png',
Expand Down

0 comments on commit c642b30

Please sign in to comment.