Add Mem0 Demo (#2291)

This commit is contained in:
Saket Aryan
2025-03-04 23:34:59 +05:30
committed by GitHub
parent f7500c925e
commit aa7ab9736d
45 changed files with 2464 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
"use client";
import React from "react";
import Image from "next/image";
export default function ThemeAwareLogo({
width = 40,
height = 40,
variant = "default",
isDarkMode = false,
}: {
width?: number;
height?: number;
variant?: "default" | "collapsed";
isDarkMode?: boolean;
}) {
// For collapsed variant, always use the icon
if (variant === "collapsed") {
return (
<div
className={`flex items-center justify-center rounded-full ${isDarkMode ? 'bg-[#6366f1]' : 'bg-[#4f46e5]'}`}
style={{ width, height }}
>
<span className="text-white font-bold text-lg">M</span>
</div>
);
}
// For default variant, use the full logo image
const logoSrc = isDarkMode ? "/images/assistant-ui-dark.svg" : "/images/assistant-ui.svg";
return (
<Image
src={logoSrc}
alt="Mem0.ai"
width={width}
height={height}
/>
);
}