mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-09 03:18:04 +00:00
fix: fix build fail, add category in storedcontenttypes
This commit is contained in:
parent
f8a917a898
commit
8664a8ba56
1 changed files with 25 additions and 23 deletions
|
|
@ -1,42 +1,44 @@
|
|||
"use client";
|
||||
import { StoredContent } from "@/server/db/schema";
|
||||
'use client';
|
||||
import { StoredContent } from '@/server/db/schema';
|
||||
import {
|
||||
Plus,
|
||||
MoreHorizontal,
|
||||
ArrowUpRight,
|
||||
Edit3,
|
||||
Trash2,
|
||||
} from "lucide-react";
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "./ui/dropdown-menu";
|
||||
} from './ui/dropdown-menu';
|
||||
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
|
||||
export default function Sidebar() {
|
||||
const websties: StoredContent[] = [
|
||||
const websites: StoredContent[] = [
|
||||
{
|
||||
id: 1,
|
||||
content: "",
|
||||
title: "Visual Studio Code",
|
||||
url: "https://code.visualstudio.com",
|
||||
description: "",
|
||||
image: "https://code.visualstudio.com/favicon.ico",
|
||||
baseUrl: "https://code.visualstudio.com",
|
||||
content: '',
|
||||
title: 'Visual Studio Code',
|
||||
url: 'https://code.visualstudio.com',
|
||||
description: '',
|
||||
image: 'https://code.visualstudio.com/favicon.ico',
|
||||
baseUrl: 'https://code.visualstudio.com',
|
||||
savedAt: new Date(),
|
||||
category: 'Development',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
content: "",
|
||||
content: '',
|
||||
title: "yxshv/vscode: An unofficial remake of vscode's landing page",
|
||||
url: "https://github.com/yxshv/vscode",
|
||||
description: "",
|
||||
image: "https://github.com/favicon.ico",
|
||||
baseUrl: "https://github.com",
|
||||
url: 'https://github.com/yxshv/vscode',
|
||||
description: '',
|
||||
image: 'https://github.com/favicon.ico',
|
||||
baseUrl: 'https://github.com',
|
||||
savedAt: new Date(),
|
||||
category: 'Development',
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -53,7 +55,7 @@ export default function Sidebar() {
|
|||
<Plus className="h-4 w-4 min-w-4" />
|
||||
</button>
|
||||
</h1>
|
||||
{websties.map((item) => (
|
||||
{websites.map((item) => (
|
||||
<ListItem key={item.id} item={item} />
|
||||
))}
|
||||
</div>
|
||||
|
|
@ -86,8 +88,8 @@ export const ListItem: React.FC<{ item: StoredContent }> = ({ item }) => {
|
|||
) : (
|
||||
<>
|
||||
<img
|
||||
src={item.image ?? "/brain.png"}
|
||||
alt={item.title ?? "Untitiled website"}
|
||||
src={item.image ?? '/brain.png'}
|
||||
alt={item.title ?? 'Untitiled website'}
|
||||
className="h-4 w-4"
|
||||
/>
|
||||
<ArrowUpRight
|
||||
|
|
@ -102,13 +104,13 @@ export const ListItem: React.FC<{ item: StoredContent }> = ({ item }) => {
|
|||
ref={editInputRef}
|
||||
autoFocus
|
||||
className="text-rgray-12 w-full bg-transparent focus:outline-none"
|
||||
placeholder={item.title ?? "Untitled website"}
|
||||
placeholder={item.title ?? 'Untitled website'}
|
||||
onBlur={(e) => setIsEditing(false)}
|
||||
onKeyDown={(e) => e.key === "Escape" && setIsEditing(false)}
|
||||
onKeyDown={(e) => e.key === 'Escape' && setIsEditing(false)}
|
||||
/>
|
||||
) : (
|
||||
<span className="w-full truncate text-nowrap">
|
||||
{item.title ?? "Untitled website"}
|
||||
{item.title ?? 'Untitled website'}
|
||||
</span>
|
||||
)}
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue