)}
diff --git a/src/components/review/TagSection.tsx b/src/components/review/TagSection.tsx
index 3270513..5d10364 100644
--- a/src/components/review/TagSection.tsx
+++ b/src/components/review/TagSection.tsx
@@ -18,7 +18,7 @@ export default function TagSection({
return (
- {title} {required && *}
+ {title} {required && *}
{options.map((option) => (
@@ -27,7 +27,7 @@ export default function TagSection({
onClick={() => onChange(option)}
variant="secondary-assistive"
color="gray"
- size="sm"
+ size="xs"
rounded="md"
selected={selected.includes(option)}
>
diff --git a/src/constants/reviewTags.ts b/src/constants/reviewTags.ts
index eda0575..39399e0 100644
--- a/src/constants/reviewTags.ts
+++ b/src/constants/reviewTags.ts
@@ -12,13 +12,20 @@ export const tagSections: TagSectionConfig[] = [
key: 'sound',
title: '음향',
required: true,
- options: ['#음향최고', '#음향아쉬움', '#소리선명', '#음질만족', '#돌비사운드굿', '#잡음있음'],
+ options: ['#음향최고', '#음질깨끗', '#몰입감좋음', '#서라운드좋음', '#소리선명', '#현장감있음'],
},
{
key: 'environment',
title: '관람 환경',
required: true,
- options: ['#좌석편함', '#시야좋음', '#청결상태굿', '#주변산만', '#출입구근처', '#조용함'],
+ options: [
+ '#좌석편함',
+ '#시야탁트임',
+ '#쾌적한환경',
+ '#입출입편리',
+ '#청결유지잘됨',
+ '#분위기좋음',
+ ],
},
{
key: 'companion',
diff --git a/src/pages/review/MovieInfoStep.tsx b/src/pages/review/MovieInfoStep.tsx
index 5240630..6a61c64 100644
--- a/src/pages/review/MovieInfoStep.tsx
+++ b/src/pages/review/MovieInfoStep.tsx
@@ -68,7 +68,8 @@ export default function MovieInfoForm() {
placeholder="관람하신 영화관을 선택해주세요"
onClickPlus={() => navigate('/review/info/cinema')}
/>
-
+
+
{/*추후 좌석 페이지 연결 시 readOnly 속성 추가*/}
= MIN_TEXT_LENGTH;
+ const isValid = reviewTitle.trim().length > 0 && text.trim().length >= MIN_TEXT_LENGTH;
const { openModal } = useModalStore();
const handleSubmit = () => {
if (!text.trim()) return;
@@ -26,9 +27,6 @@ export default function ReviewTextForm() {
},
});
};
- const { isInitialized } = useReviewStore();
- const navigate = useNavigate();
-
useEffect(() => {
if (!isInitialized) {
navigate('/review');
@@ -71,9 +69,20 @@ export default function ReviewTextForm() {
{/* 텍스트 입력 */}
-
+
+
{
+ if (value.length <= 20) setReviewTitle(value);
+ }}
+ />
+
+ 후기 내용 *
+
diff --git a/src/store/useReviewStore.ts b/src/store/useReviewStore.ts
index 6f964f1..17b4d5e 100644
--- a/src/store/useReviewStore.ts
+++ b/src/store/useReviewStore.ts
@@ -6,6 +6,8 @@ interface CinemaInfo {
}
interface ReviewState {
+ reviewTitle: string; //후기 제목
+ setReviewTitle: (title: string) => void;
movieTitle: string;
cinema: CinemaInfo | null;
seats: string[];
@@ -30,6 +32,8 @@ interface ReviewState {
}
export const useReviewStore = create
((set) => ({
+ reviewTitle: '',
+ setReviewTitle: (title) => set({ reviewTitle: title }),
movieTitle: '',
cinema: null,
seats: [],
@@ -50,6 +54,7 @@ export const useReviewStore = create((set) => ({
reset: () =>
set({
movieTitle: '',
+ reviewTitle: '',
cinema: null,
seats: [],
rating: 0,
@@ -76,12 +81,28 @@ export const useReviewStore = create((set) => ({
toggleTag: (type, tag) =>
set((state) => {
const current = state.tags[type];
- const updated = current.includes(tag) ? current.filter((t) => t !== tag) : [...current, tag];
- return {
- tags: {
- ...state.tags,
- [type]: updated,
- },
- };
+ const isSelected = current.includes(tag);
+
+ const totalSelected =
+ state.tags.sound.length + state.tags.sound.length + state.tags.companion.length;
+
+ if (isSelected) {
+ return {
+ tags: {
+ ...state.tags,
+ [type]: current.filter((t) => t !== tag),
+ },
+ };
+ }
+ if (totalSelected < 5) {
+ return {
+ tags: {
+ ...state.tags,
+ [type]: [...current, tag],
+ },
+ };
+ }
+
+ return {};
}),
}));