Skip to content

Commit

Permalink
refactor: add lib in create page
Browse files Browse the repository at this point in the history
  • Loading branch information
moolmin committed Nov 17, 2024
1 parent 65ff9bc commit 2c9bed2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
29 changes: 29 additions & 0 deletions src/app/(pages)/4q-create/(modals)/_lib/tags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export const moodTags = [
"고전",
"귀여움",
"꽃무늬",
"네온",
"도시",
"시골",
"밝은",
"어두운",
"빈티지",
"심플",
"럭셔리",
"자연친화적",
];

export const colorTags = [
"블루",
"그린",
"레드",
"옐로우",
"퍼플",
"블랙",
"화이트",
"흑백",
];

export const seasonTags = ["봄", "여름", "가을", "겨울"];

export const hotTags = ["네온", "겨울", "그린", "밝은", "심플", "화이트"];
29 changes: 2 additions & 27 deletions src/app/(pages)/4q-create/(modals)/tagSelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button, Alert } from "antd";
import styles from "./tagSelectModal.module.css";
import hot_mark from "../../../../../public/images/hot_tag.png";
import tagTranslationMap from "@/lib/tagTranslationKrEn";
import { moodTags, colorTags, seasonTags, hotTags } from './_lib/tags'

interface TagSelectorProps {
selectedTags: string[];
Expand All @@ -20,34 +21,8 @@ export default function TagSelector({

const MAX_TAGS = 3;

const moodTags = [
"고전",
"귀여움",
"꽃무늬",
"네온",
"도시",
"시골",
"밝은",
"어두운",
"빈티지",
"심플",
"럭셔리",
"자연친화적",
];
const colorTags = [
"블루",
"그린",
"레드",
"옐로우",
"퍼플",
"블랙",
"화이트",
"흑백",
];
const seasonTags = ["봄", "여름", "가을", "겨울"];

const isHotTag = (tag: string) => {
const hotTags = ["네온", "겨울", "그린", "밝은", "심플", "화이트"];

return hotTags.includes(tag);
};

Expand Down
1 change: 0 additions & 1 deletion src/app/(pages)/4q-create/_components/first.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export default function First({ formRef, onSubmit }: FirstProps) {
</Select>
</Form.Item>
</Form>

<Modal
title=""
open={isModalOpen}
Expand Down
1 change: 0 additions & 1 deletion src/app/(pages)/4q-create/_components/third.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ interface TextNode {
color: string;
}


interface FormData {
url: string;
shortenUrl: string;
Expand Down

0 comments on commit 2c9bed2

Please sign in to comment.