Skip to content

Commit

Permalink
(#72) 🎨 design: μ΄ˆκΈ°μ— 챗봇 κ°€μ΄λ“œ 이미지도 λ„μš°λ„λ‘ μ„€μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
inaemon committed Nov 27, 2024
1 parent 3ad77bd commit 4e24904
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/pages/Chatbot/Chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import RookieChat from "./components/RookieChat";
import UserChat from "./components/UserChat";
import CategoryChat from "./components/CategoryChat";

import RookieImageMessage from "./components/message/custom/RookieImageMessage";
import chatbotManualIcon from "@/src/assets/webp/chatbot_manual.webp";

const Chatbot = () => {
// μŠ€νƒ€λ””μ›€ 선택 κ΄€λ ¨
const [selectedStadium, setSelectedStadium] = useState<string | null>(null); // μ„ νƒν•œ μŠ€νƒ€λ””μ›€ μ €μž₯
Expand Down Expand Up @@ -114,6 +117,21 @@ const Chatbot = () => {
}, [selectedStadium, selectedCategories, responseGuideDataList]);



// μ²˜μŒμ— 보여쀄 컨텐츠
const renderInitialMessage = () => {
return (
<>
{/* 루킀 μ‚¬μš© μ„€λͺ…μ„œ */}
<RookieImageMessage imgUrl={chatbotManualIcon} />

{/* μŠ€νƒ€λ””μ›€ 선택창 */}
<StadiumSelection stadiums={stadiumList} onSelect={handleStadiumSelect} />
</>
);
}


return (
<>
{/* 1. 헀더바 */}
Expand Down Expand Up @@ -142,7 +160,7 @@ const Chatbot = () => {
contentList={[
{
type: "component",
content: <StadiumSelection stadiums={stadiumList} onSelect={handleStadiumSelect} />
content: renderInitialMessage()
}
]}
/>
Expand Down

0 comments on commit 4e24904

Please sign in to comment.