import React from "react"; import Image from "next/image"; import Link from "next/link"; import Logo from "../../public/logo.svg"; import { AddIcon, ChatIcon } from "@repo/ui/icons"; import DynamicIsland from "./dynamicisland"; import { db } from "@/server/db"; import { getChatHistory } from "../actions/fetchers"; async function Header() { const chatThreads = await getChatHistory(); if (!chatThreads.success || !chatThreads.data) { return
Error fetching chat threads
; } return (
SuperMemory logo
{chatThreads.data.map((thread) => ( {thread.firstMessage} ))}
); } export default Header;