From fca8de0a542d0137aa5db5f1ed7f390f93aa9f88 Mon Sep 17 00:00:00 2001 From: Creative-Titilayo Date: Tue, 2 Jun 2026 09:46:53 +0100 Subject: [PATCH] fix(frontend): move ChatMessage to shared domain types --- frontend/src/app/page.tsx | 3 ++- frontend/src/components/features/chat/ChatInterface.tsx | 3 +-- frontend/src/config/mockData.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index ad09127..2792284 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -31,7 +31,7 @@ import { PortfolioChartSkeleton, } from "../components/feedback/SkeletonLoader"; import { WalletModalTest } from "../components/features/wallet/WalletModalTest"; -import { ChatInterface, type ChatMessage } from "../components/features/chat/ChatInterface"; +import { ChatInterface } from "../components/features/chat/ChatInterface"; import { goalData, initialMessages } from "../config/mockData"; import toast from 'react-hot-toast'; import { GoalTracker } from "../components/features/portfolio/GoalTracker"; @@ -42,6 +42,7 @@ import { Network, Cpu, ShieldCheck, Zap } from "lucide-react"; import { motion, useReducedMotion } from "framer-motion"; import { makeContainerVariants, makeEntranceVariants } from "../lib/motion"; +import type { ChatMessage } from "../types/domain"; export default function Home() { const prefersReduced = useReducedMotion(); diff --git a/frontend/src/components/features/chat/ChatInterface.tsx b/frontend/src/components/features/chat/ChatInterface.tsx index 93fe48d..2aeb19f 100644 --- a/frontend/src/components/features/chat/ChatInterface.tsx +++ b/frontend/src/components/features/chat/ChatInterface.tsx @@ -4,8 +4,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { AlertCircle, Bot, CheckCircle2, Send } from "lucide-react"; import { motion, AnimatePresence, useReducedMotion } from "framer-motion"; -export type { ChatMessage } from '../../../types/domain'; -import type { ChatMessage } from '../../../types/domain'; +import type { ChatMessage } from "../../../types/domain"; export interface ChatInterfaceProps { messages: ChatMessage[]; diff --git a/frontend/src/config/mockData.ts b/frontend/src/config/mockData.ts index 6c0167d..4445f11 100644 --- a/frontend/src/config/mockData.ts +++ b/frontend/src/config/mockData.ts @@ -1,4 +1,4 @@ -import type { ChatMessage } from '../components/features/chat/ChatInterface'; +import type { ChatMessage } from '../types/domain'; import type { AssetAllocation } from '../utils/chartUtils'; import type { GoalData } from '../utils/goalProjection';