Skip to content

Commit 928fc74

Browse files
committed
refactor(#128): 매직넘버 상수화 및 상수 파일 생성
1 parent 935938b commit 928fc74

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/app/story/[id]/_components/StoryDetailContent/StoryDetailContent.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ import { GNB } from "@/components/ui/GNB";
1616
import { Text } from "@/components/ui/Text";
1717

1818
import { storyDetailQueryOptions } from "../../_api";
19+
import { KAKAO_PLACE_URL, STORIES_LIMIT } from "../../_constants";
1920
import * as styles from "./StoryDetailContent.css";
2021

2122
type StoryDetailContentProps = {
2223
storyId: string;
2324
};
2425

25-
const KAKAO_PLACE_URL = "https://place.map.kakao.com";
26-
2726
export const StoryDetailContent = ({ storyId }: StoryDetailContentProps) => {
2827
const router = useRouter();
2928

3029
const { data: story } = useSuspenseQuery(storyDetailQueryOptions(storyId));
31-
const { data: storiesData } = useSuspenseQuery(storiesQueryOptions(20));
30+
const { data: storiesData } = useSuspenseQuery(
31+
storiesQueryOptions(STORIES_LIMIT)
32+
);
3233

3334
const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);
3435

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./storyDetail.constants";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const KAKAO_PLACE_URL = "https://place.map.kakao.com";
2+
export const STORIES_LIMIT = 20;

0 commit comments

Comments
 (0)