diff options
| author | Dhravya Shah <[email protected]> | 2025-01-22 17:23:22 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-01-22 17:23:22 -0700 |
| commit | 0c0ea871c3d8ffa7c81af32d0e7a40e8939aa731 (patch) | |
| tree | 393176aba8d32a4828390039fb9bb295ef8c87d0 /apps/web | |
| parent | Merge branch 'main' of github.com:supermemoryai/supermemory (diff) | |
| download | supermemory-0c0ea871c3d8ffa7c81af32d0e7a40e8939aa731.tar.xz supermemory-0c0ea871c3d8ffa7c81af32d0e7a40e8939aa731.zip | |
fix: postgres error
Diffstat (limited to 'apps/web')
| -rw-r--r-- | apps/web/app/components/memories/Integrations.tsx | 24 | ||||
| -rw-r--r-- | apps/web/package.json | 2 | ||||
| -rw-r--r-- | apps/web/vite.config.ts | 2 |
3 files changed, 25 insertions, 3 deletions
diff --git a/apps/web/app/components/memories/Integrations.tsx b/apps/web/app/components/memories/Integrations.tsx index 74c6e882..3825980c 100644 --- a/apps/web/app/components/memories/Integrations.tsx +++ b/apps/web/app/components/memories/Integrations.tsx @@ -7,12 +7,13 @@ import { Card } from "../ui/card"; import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../ui/dialog"; import { motion } from "framer-motion"; -import { AlertCircle, CheckCircle, Clipboard, ClipboardCheckIcon, X } from "lucide-react"; +import { AlertCircle, CheckCircle, Clipboard, ClipboardCheckIcon, X, FileUpIcon } from "lucide-react"; import { toast } from "sonner"; import { type IntegrationConfig, getIntegrations } from "~/config/integrations"; import { getChromeExtensionId } from "~/config/util"; import { cn } from "~/lib/utils"; import { loader } from "~/root"; +import { CSVUploadModal } from "./CSVUploadModal"; function IntegrationButton({ integration, @@ -150,6 +151,7 @@ function Integrations() { const [loadingIntegration, setLoadingIntegration] = useState<IntegrationConfig | null>(null); const [apiKey, setApiKey] = useState<string | null>(null); const [copied, setCopied] = useState(false); + const [isCSVModalOpen, setIsCSVModalOpen] = useState(false); const handleIntegrationClick = (integration: IntegrationConfig) => { setLoadingIntegration(integration); @@ -254,6 +256,24 @@ function Integrations() { </div> <div className="flex flex-wrap gap-4 overflow-x-auto"> + <Card + className="group relative overflow-hidden transition-all hover:shadow-lg flex-1 basis-[calc(33.333%-1rem)]" + onClick={() => setIsCSVModalOpen(true)} + > + <div className="absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 bg-gradient-to-r from-blue-500/10 to-blue-600/10" /> + <div className="relative z-10 flex flex-col items-center gap-4 p-6"> + <div className="rounded-full bg-white/10 p-3"> + <FileUpIcon className="transition-transform group-hover:scale-110 text-blue-500" /> + </div> + <div className="text-center"> + <h3 className="font-semibold text-neutral-900 dark:text-white">CSV Upload</h3> + <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400 hidden md:block"> + Bulk import URLs from a CSV file + </p> + </div> + </div> + </Card> + {Object.entries(integrations).map(([key, integration]) => ( <IntegrationButton key={key} @@ -270,6 +290,8 @@ function Integrations() { /> )} + <CSVUploadModal isOpen={isCSVModalOpen} onClose={() => setIsCSVModalOpen(false)} /> + <div className="mt-8 md:mt-12 text-center"> <p className="text-sm text-neutral-600 dark:text-neutral-400"> More integrations coming soon.{" "} diff --git a/apps/web/package.json b/apps/web/package.json index 673fa345..1635235d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -119,7 +119,7 @@ "isbot": "^5.1.17", "lucide-react": "^0.456.0", "masonic": "^4.0.1", - "postgres": "^3.4.4", + "postgres": "^3.4.5", "prettier-eslint": "^16.3.0", "prismjs": "^1.29.0", "react": "^18.3.1", diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index a20e1d55..30a24be6 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -40,7 +40,7 @@ export default defineConfig((mode) => { resolve: { alias: { ...(mode.mode === "development" && { - postgres: path.resolve(__dirname, "node_modules/postgres/src/index.js"), + postgres: path.resolve(__dirname, "../../node_modules/postgres/src/index.js"), }), }, extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".css"], |