Skip to content

Commit

Permalink
Merge pull request #76 from DoTheZ-Team/GLUE-386-빌드-트리거
Browse files Browse the repository at this point in the history
GLUE 386 이미지 로딩을 위한 config 수정
  • Loading branch information
leejuae authored Jun 10, 2024
2 parents 5fffbdb + 32aec50 commit 49a3ba3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 175 deletions.
8 changes: 7 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const nextConfig = {
return config;
},
images: {
domains: [
process.env.NEXT_PUBLIC_STICKER_URL,
,
process.env.NEXT_PUBLIC_IMAGE_URL,
'glueyourday.kro.kr',
],
remotePatterns: [
{
protocol: 'https',
Expand All @@ -19,7 +25,7 @@ const nextConfig = {
},
{
protocol: 'http',
hostname: 'www.glueyourday.kro.kr',
hostname: 'glueyourday.kro.kr',
port: '',
},
],
Expand Down
4 changes: 4 additions & 0 deletions src/app/(publish)/components/StickerFetcher/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export default function useFetchSticker() {
useEffect(() => {
setStickers([]);
refetch();

return () => {
setStickers([]);
};
}, [refetch]);

return { stickers, fetchRef, isFetching };
Expand Down
30 changes: 2 additions & 28 deletions src/app/(publish)/components/StickerPannel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
'use client';

import { Dispatch, SetStateAction, useState } from 'react';
import { Dispatch, SetStateAction } from 'react';
import { Button, Input, StickerClose, StickerStar } from '@/components/Common';
import { cn } from '@/utils';
import { AsyncBoundaryWithQuery } from '@/react-utils';
import { Ghost, Github, Smile, Star } from '../../constants/dummyIcons';
import useStickerPannel from './hooks/useStickerPannel';
import StickerPannelRenderer from './components/StickerPannelRenderer';
import StickerFetcher from '../StickerFetcher';

// TODO: Icon이 선택되는 경우 색상이 변경되도록 attribute 설정
const stickerTabs = [
{ id: 0, Icon: Github },
{ id: 1, Icon: Ghost },
{ id: 2, Icon: Smile },
{ id: 3, Icon: Star },
] as const;

interface StickerPannelProp {
editable: boolean;
setEditable: Dispatch<SetStateAction<boolean>>;
Expand All @@ -26,7 +17,6 @@ export default function StickerPannel({
editable,
setEditable,
}: StickerPannelProp) {
const [selectedId, setSelectedId] = useState<number>(0);
const {
addStickerToPanel,
showStickers,
Expand Down Expand Up @@ -89,23 +79,7 @@ export default function StickerPannel({

{showStickers && (
<section className="mt-20 overflow-scroll">
<div>
<div className="flex gap-2 px-20 mb-6">
{stickerTabs.map(({ id, Icon }) => (
<Icon
key={id}
className={cn(
'w-34 h-34 p-5 cursor-pointer',
id === selectedId && 'bg-[#FFEBDF] rounded-4',
)}
onClick={() => setSelectedId(id)}
selected={id === selectedId}
/>
))}
</div>

<div className="w-full h-1 bg-[#D8D8D8]" />
</div>
<div className="w-full h-1 bg-[#D8D8D8]" />

<AsyncBoundaryWithQuery>
<StickerFetcher>
Expand Down
39 changes: 0 additions & 39 deletions src/app/(publish)/constants/dummyIcons/Ghost.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions src/app/(publish)/constants/dummyIcons/Github.tsx

This file was deleted.

46 changes: 0 additions & 46 deletions src/app/(publish)/constants/dummyIcons/Smile.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/app/(publish)/constants/dummyIcons/Star.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/app/(publish)/constants/dummyIcons/index.tsx

This file was deleted.

0 comments on commit 49a3ba3

Please sign in to comment.