diff --git a/frontend/src/components/EmotionalStats.tsx b/frontend/src/components/EmotionalStats.tsx new file mode 100644 index 0000000..5958528 --- /dev/null +++ b/frontend/src/components/EmotionalStats.tsx @@ -0,0 +1,18 @@ +import type { ContentAnalysisResponse } from "../types/ApiTypes" +import StatsStyling from "../styles/stats_styling"; + +const styles = StatsStyling; + +type EmotionalStatsProps = { + contentData: ContentAnalysisResponse; +} + +const EmotionalStats = ({contentData}: EmotionalStatsProps) => { + return ( +
+

lol

+
+ ) +} + +export default EmotionalStats; \ No newline at end of file diff --git a/frontend/src/pages/Stats.tsx b/frontend/src/pages/Stats.tsx index d5943dc..f94e43d 100644 --- a/frontend/src/pages/Stats.tsx +++ b/frontend/src/pages/Stats.tsx @@ -2,6 +2,7 @@ import { useEffect, useState, useRef } from "react"; import axios from "axios"; import StatsStyling from "../styles/stats_styling"; import SummaryStats from "../components/SummaryStats"; +import EmotionalStats from "../components/EmotionalStats"; import { type SummaryResponse, @@ -15,6 +16,7 @@ const styles = StatsStyling; const StatPage = () => { const [error, setError] = useState(''); const [loading, setLoading] = useState(false); + const [activeView, setActiveView] = useState<"summary" | "emotional">("summary"); const [userData, setUserData] = useState(null); const [timeData, setTimeData] = useState(null); @@ -118,15 +120,42 @@ return (
Analytics Dashboard
- +
+ + +
+ + {activeView === "summary" && ( + + )} + + {activeView === "emotional" && contentData && ( + + )} + + {activeView === "emotional" && !contentData && ( +
+ No emotional data available. +
+ )} ); } -export default StatPage; \ No newline at end of file +export default StatPage;