+
-
diff --git a/src/pages/onboarding/__components/OnboardingStep2.tsx b/src/pages/onboarding/__components/OnboardingStep2.tsx
index 7bed3ec..88a9780 100644
--- a/src/pages/onboarding/__components/OnboardingStep2.tsx
+++ b/src/pages/onboarding/__components/OnboardingStep2.tsx
@@ -1,133 +1,10 @@
import { useState } from "react";
import type { OnboardingData } from "@/pages/onboarding/OnboardingPage";
import { Button } from "@/components/ui/button";
-import { Badge } from "@/components/ui/badge";
-import { Check, ChevronsUpDown, X } from "lucide-react";
import { cn } from "@/lib/utils";
-import {
- Command,
- CommandEmpty,
- CommandGroup,
- CommandInput,
- CommandItem,
-} from "@/components/ui/command";
-import {
- Popover,
- PopoverContent,
- PopoverTrigger,
-} from "@/components/ui/popover";
-import {
- Accordion,
- AccordionContent,
- AccordionItem,
- AccordionTrigger,
-} from "@/components/ui/accordion";
import { Label } from "@/components/ui/label";
-
-const POSITION_DATA = [
- {
- category: "개발",
- positions: [
- {
- id: 101,
- name: "Frontend Developer",
- description: "React, Vue, Angular 등 프론트엔드 기술",
- },
- {
- id: 102,
- name: "Backend Developer",
- description: "Node.js, Python, Java 등 서버 개발",
- },
- {
- id: 103,
- name: "Fullstack Developer",
- description: "프론트엔드와 백엔드 모두 가능",
- },
- {
- id: 104,
- name: "Mobile Developer",
- description: "iOS, Android, React Native, Flutter",
- },
- {
- id: 105,
- name: "Game Developer",
- description: "게임 엔진, 게임 기획 및 개발",
- },
- {
- id: 106,
- name: "Embedded Developer",
- description: "IoT, 하드웨어, 임베디드 시스템",
- },
- {
- id: 107,
- name: "Blockchain Developer",
- description: "블록체인, 스마트 컨트랙트",
- },
- ],
- },
- {
- category: "인프라",
- positions: [
- {
- id: 201,
- name: "DevOps Engineer",
- description: "CI/CD, 클라우드, 인프라 관리",
- },
- {
- id: 202,
- name: "Security Engineer",
- description: "보안 시스템, 취약점 분석",
- },
- ],
- },
- {
- category: "데이터",
- positions: [
- {
- id: 301,
- name: "AI/ML Engineer",
- description: "머신러닝, 딥러닝, 데이터 분석",
- },
- {
- id: 302,
- name: "Data Engineer",
- description: "데이터 파이프라인, 빅데이터 처리",
- },
- {
- id: 303,
- name: "Data Scientist",
- description: "데이터 분석, 통계, 비즈니스 인사이트",
- },
- ],
- },
- {
- category: "기획/디자인",
- positions: [
- {
- id: 501,
- name: "Product Manager",
- description: "제품 기획, 프로젝트 관리",
- },
- {
- id: 502,
- name: "UI/UX Designer",
- description: "사용자 경험, 인터페이스 디자인",
- },
- { id: 503, name: "QA Engineer", description: "테스트, 품질 관리" },
- ],
- },
-];
-const ALL_STACKS = [
- { id: 1, value: "react", label: "React" },
- { id: 2, value: "typescript", label: "TypeScript" },
- { id: 3, value: "javascript", label: "JavaScript" },
- { id: 4, value: "next.js", label: "Next.js" },
- { id: 5, value: "vue", label: "Vue.js" },
- { id: 6, value: "java", label: "Java" },
- { id: 7, value: "spring", label: "Spring" },
- { id: 8, value: "python", label: "Python" },
- { id: 9, value: "django", label: "Django" },
-];
+import { PositionSelector } from "@/components/common/PositionSelector";
+import { StackSelector } from "@/components/common/StackSelector";
const INTEREST_TOPICS = [
{ id: 1, name: "업계 동향" },
{ id: 2, name: "직무 정보" },
@@ -146,7 +23,6 @@ interface StepProps {
export function OnboardingStep2({ onNext, data }: StepProps) {
const [position, setPosition] = useState
(data.position);
- const [open, setOpen] = useState(false);
const [selectedStackIds, setSelectedStackIds] = useState(
data.techStack || []
);
@@ -154,23 +30,12 @@ export function OnboardingStep2({ onNext, data }: StepProps) {
data.interests || []
);
- const handleSelectStack = (stackId: number) => {
- const newStackIds = selectedStackIds.includes(stackId)
- ? selectedStackIds.filter((id) => id !== stackId)
- : [...selectedStackIds, stackId];
- setSelectedStackIds(newStackIds);
- setOpen(false);
- };
- const handleRemoveStack = (stackIdToRemove: number) => {
- setSelectedStackIds(
- selectedStackIds.filter((id) => id !== stackIdToRemove)
- );
- };
-
const handleInterestToggle = (topicId: number) => {
const newInterestIds = selectedInterestIds.includes(topicId)
? selectedInterestIds.filter((id) => id !== topicId)
- : [...selectedInterestIds, topicId];
+ : selectedInterestIds.length < 3
+ ? [...selectedInterestIds, topicId]
+ : selectedInterestIds;
setSelectedInterestIds(newInterestIds);
};
@@ -191,122 +56,22 @@ export function OnboardingStep2({ onNext, data }: StepProps) {
};
return (
-
+
-
-
-
- {POSITION_DATA.map((cat) => (
-
-
- {cat.category}
-
-
-
- {cat.positions.map((pos) => (
-
- ))}
-
-
-
- ))}
-
-
+ {/* 포지션 */}
+
setPosition(positionId)}
+ />
-
-
-
-
-
-
-
-
-
- 검색 결과가 없습니다.
-
- {ALL_STACKS.map((stack) => (
- handleSelectStack(stack.id)}
- className="aria-selected:bg-gray-700"
- >
-
- {stack.label}
-
- ))}
-
-
-
-
-
- {selectedStackIds.map((stackId) => {
- const stack = ALL_STACKS.find((s) => s.id === stackId);
- return (
-
- {stack?.label}
-
-
- );
- })}
-
-
+ {/* 기술 스택 */}
+
-
+
{INTEREST_TOPICS.map((topic) => (
))}
@@ -329,8 +93,7 @@ export function OnboardingStep2({ onNext, data }: StepProps) {
diff --git a/src/pages/onboarding/__components/OnboardingStep3.tsx b/src/pages/onboarding/__components/OnboardingStep3.tsx
index 44f0b1b..e0ba646 100644
--- a/src/pages/onboarding/__components/OnboardingStep3.tsx
+++ b/src/pages/onboarding/__components/OnboardingStep3.tsx
@@ -22,63 +22,63 @@ export function OnboardingStep3({ onNext, data }: StepProps) {
return (
-
+
다른 사람들에게 자신을 보여줄 수 있는 링크를 추가해보세요. (선택사항)
-
+
-
+
-
+
-
+
@@ -86,8 +86,7 @@ export function OnboardingStep3({ onNext, data }: StepProps) {
diff --git a/src/pages/onboarding/__components/OnboardingStep4.tsx b/src/pages/onboarding/__components/OnboardingStep4.tsx
index 02ed61c..6c5f4cd 100644
--- a/src/pages/onboarding/__components/OnboardingStep4.tsx
+++ b/src/pages/onboarding/__components/OnboardingStep4.tsx
@@ -30,7 +30,7 @@ export function OnboardingStep4() {
}, []);
const handleSubmit = () => {
- navigate("/");
+ navigate("/board");
};
return (
@@ -39,8 +39,7 @@ export function OnboardingStep4() {
className={cn(
"text-4xl font-bold text-white transition-opacity duration-1000 ease-in-out",
showText1 ? "opacity-100" : "opacity-0"
- )}
- >
+ )}>
환영합니다!
@@ -48,21 +47,18 @@ export function OnboardingStep4() {
className={cn(
"text-lg text-gray-300 transition-opacity duration-1000 ease-in-out",
showText2 ? "opacity-100" : "opacity-0"
- )}
- >
- CO-MEET와 함께 즐거운 개발 생활 되세요!
+ )}>
+ CO-MEET과 함께 즐거운 개발 생활 되세요!
+ )}>
diff --git a/src/components/search/RecentSearchList.tsx b/src/pages/search/_components/RecentSearchList.tsx
similarity index 77%
rename from src/components/search/RecentSearchList.tsx
rename to src/pages/search/_components/RecentSearchList.tsx
index 546301c..a0f3438 100644
--- a/src/components/search/RecentSearchList.tsx
+++ b/src/pages/search/_components/RecentSearchList.tsx
@@ -1,5 +1,5 @@
-import { Button } from '@/components/ui/button';
-import { X } from 'lucide-react';
+import { Button } from "@/components/ui/button";
+import { X } from "lucide-react";
interface RecentSearchListProps {
searches: string[];
@@ -10,7 +10,7 @@ interface RecentSearchListProps {
export default function RecentSearchList({
searches,
onSearchClick,
- onRemove
+ onRemove,
}: RecentSearchListProps) {
if (searches.length === 0) {
return (
@@ -21,27 +21,25 @@ export default function RecentSearchList({
}
return (
- <>
+
{searches.map((search, index) => (
))}
- >
+
);
}
diff --git a/src/components/search/SearchHeader.tsx b/src/pages/search/_components/SearchHeader.tsx
similarity index 70%
rename from src/components/search/SearchHeader.tsx
rename to src/pages/search/_components/SearchHeader.tsx
index 7e8110a..bff3bd8 100644
--- a/src/components/search/SearchHeader.tsx
+++ b/src/pages/search/_components/SearchHeader.tsx
@@ -1,5 +1,5 @@
-import { Button } from '@/components/ui/button';
-import { ArrowLeft } from 'lucide-react';
+import { Button } from "@/components/ui/button";
+import { ArrowLeft } from "lucide-react";
interface SearchHeaderProps {
query: string;
@@ -12,31 +12,30 @@ export default function SearchHeader({
query,
onQueryChange,
onSubmit,
- onBack
+ onBack,
}: SearchHeaderProps) {
return (
-
+
);
-}
\ No newline at end of file
+}
diff --git a/src/pages/search/index.tsx b/src/pages/search/index.tsx
index aa0fd91..b141572 100644
--- a/src/pages/search/index.tsx
+++ b/src/pages/search/index.tsx
@@ -1,7 +1,6 @@
import { useState } from "react";
-import GlobalLayout from "@/components/layout/GlobalLayout";
-import RecentSearchList from "@/components/search/RecentSearchList";
-import SearchHeader from "@/components/search/SearchHeader";
+import RecentSearchList from "@/pages/search/_components/RecentSearchList";
+import SearchHeader from "@/pages/search/_components/SearchHeader";
export default function SearchPage() {
const [query, setQuery] = useState("");
@@ -24,24 +23,21 @@ export default function SearchPage() {
};
return (
-
-
-
{}}
+
+ {}}
+ />
+
+
-
-
-
-
-
-
+
+
);
}
diff --git a/src/types/community.ts b/src/types/community.ts
index 673b92c..485700d 100644
--- a/src/types/community.ts
+++ b/src/types/community.ts
@@ -1,3 +1,15 @@
+export interface Reply {
+ id: number;
+ author: {
+ name: string;
+ avatarUrl: string;
+ };
+ content: string;
+ createdAt: string;
+ likeCount: number;
+ isLiked: boolean;
+}
+
export interface Comment {
id: number;
author: {
@@ -7,6 +19,9 @@ export interface Comment {
content: string;
createdAt: string;
likeCount: number;
+ isLiked: boolean;
+ replyCount: number;
+ replies?: Reply[];
}
export interface Post {
@@ -22,4 +37,4 @@ export interface Post {
likeCount: number;
isLiked: boolean;
comments: Comment[];
-}
\ No newline at end of file
+}