mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-10 22:41:17 +00:00
62 lines
1.7 KiB
XML
62 lines
1.7 KiB
XML
"use client"
|
|
|
|
import type { DocumentsWithMemoriesResponseSchema } from "@repo/validation/api"
|
|
import type { z } from "zod"
|
|
import { dmSansClassName } from "@/lib/fonts"
|
|
import { cn } from "@lib/utils"
|
|
|
|
type DocumentsResponse = z.infer<typeof DocumentsWithMemoriesResponseSchema>
|
|
type DocumentWithMemories = DocumentsResponse["documents"][0]
|
|
|
|
export function GoogleDocsPreview({
|
|
document,
|
|
}: {
|
|
document: DocumentWithMemories
|
|
}) {
|
|
return (
|
|
<div className="bg-[#0B1017] p-3 rounded-[18px] gap-3">
|
|
<div className="flex items-center gap-2 mb-2">
|
|
<svg
|
|
className="w-4 h-4"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 87.3 78"
|
|
aria-label="Google Docs"
|
|
>
|
|
<title>Google Docs</title>
|
|
<path
|
|
fill="#0066da"
|
|
d="m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3L27.5 53H0c0 1.55.4 3.1 1.2 4.5z"
|
|
/>
|
|
<path
|
|
fill="#00ac47"
|
|
d="M43.65 25 29.9 1.2c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44A9.06 9.06 0 0 0 0 53h27.5z"
|
|
/>
|
|
<path
|
|
fill="#ea4335"
|
|
d="M73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75L86.1 57.5c.8-1.4 1.2-2.95 1.2-4.5H59.798l5.852 11.5z"
|
|
/>
|
|
<path
|
|
fill="#00832d"
|
|
d="M43.65 25 57.4 1.2C56.05.4 54.5 0 52.9 0H34.4c-1.6 0-3.15.45-4.5 1.2z"
|
|
/>
|
|
<path
|
|
fill="#2684fc"
|
|
d="M59.8 53H27.5L13.75 76.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"
|
|
/>
|
|
<path
|
|
fill="#ffba00"
|
|
d="m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3L43.65 25 59.8 53h27.45c0-1.55-.4-3.1-1.2-4.5z"
|
|
/>
|
|
</svg>
|
|
<p className={cn(dmSansClassName(), "text-[12px] font-semibold")}>
|
|
Google Docs
|
|
</p>
|
|
</div>
|
|
{document.content && (
|
|
<p className="text-[10px] text-[#737373] line-clamp-4">
|
|
{document.content}
|
|
</p>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|