diff options
| author | Dhravya Shah <[email protected]> | 2025-03-17 15:18:40 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-03-17 15:18:40 -0700 |
| commit | 5582402a9f65698f0fe63de5bac18e8b09fa9e67 (patch) | |
| tree | 68946760e94ba40158a124987750cfa43545132e /apps | |
| parent | Minor cleanup and fix (diff) | |
| download | supermemory-5582402a9f65698f0fe63de5bac18e8b09fa9e67.tar.xz supermemory-5582402a9f65698f0fe63de5bac18e8b09fa9e67.zip | |
fix: tweets view
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/backend/src/minimal.ts | 18 | ||||
| -rw-r--r-- | apps/web/app/components/memories/SharedCard.tsx | 19 | ||||
| -rw-r--r-- | apps/web/vite.config.ts | 1 | ||||
| -rw-r--r-- | apps/web/worker-configuration.d.ts | 1 | ||||
| -rw-r--r-- | apps/web/wrangler.toml | 2 |
5 files changed, 17 insertions, 24 deletions
diff --git a/apps/backend/src/minimal.ts b/apps/backend/src/minimal.ts deleted file mode 100644 index 4647dd33..00000000 --- a/apps/backend/src/minimal.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { fromHono } from "chanfana"; -import { Hono } from "hono"; -import { serve as serveHono } from "@hono/node-server"; - -const app = fromHono(new Hono()); - -app.get("/", (c) => { - return c.json({ message: "Hello, world!" }); -}); - -app.get("/entry/:id", (c) => { - const id = c.req.param("id"); - return c.json({ message: `Hello, ${id}!` }); -}); - -serveHono(app, (info) => { - console.log(info); -}); diff --git a/apps/web/app/components/memories/SharedCard.tsx b/apps/web/app/components/memories/SharedCard.tsx index 69283324..04ba769b 100644 --- a/apps/web/app/components/memories/SharedCard.tsx +++ b/apps/web/app/components/memories/SharedCard.tsx @@ -88,18 +88,24 @@ const renderContent = { return <CustomTwitterComp tweet={parsedData} />; } catch (error) { console.error("Error parsing raw tweet data:", error); - return <div className="p-4 text-muted-foreground">Error parsing tweet data</div>; + return ( + <div className="p-4 text-muted-foreground">Error parsing tweet data. {rawContent}</div> + ); } } // Otherwise use normal tweet ID flow - const tweetId = ourData.content?.match(/\/status\/(\d+)/)?.[1] ?? ourData.content; + const tweetId = ourData.url?.match(/\/status\/(\d+)/)?.[1] ?? ourData.url; const { data, error } = useTweet(tweetId ?? undefined); if (error) { console.error("Error parsing tweet:", error); console.log("Tweet ID:", tweetId); - return <div className="p-4 text-muted-foreground">Error parsing tweet</div>; + return ( + <div className="p-4 text-muted-foreground"> + Error parsing tweet. {tweetId} {JSON.stringify(error)} + </div> + ); } if (!data || typeof data == "undefined") { @@ -554,6 +560,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: true, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); return; @@ -579,6 +586,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: true, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); } catch (error) { @@ -599,6 +607,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: false, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); } finally { @@ -824,11 +833,11 @@ export const SpaceSelector = function SpaceSelector({ if (!spacesData?.spaces) return []; return spacesData.spaces.filter( (space) => - space.name.toLowerCase().includes(search.toLowerCase()) && space.uuid !== (spaceId ? spaceId.split("---")[0] : "<HOME>"), + space.name.toLowerCase().includes(search.toLowerCase()) && + space.uuid !== (spaceId ? spaceId.split("---")[0] : "<HOME>"), ); }, [spacesData?.spaces, search]); - if (isLoading) { return ( <DropdownMenuSubContent> diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 30a24be6..bed2b173 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -76,5 +76,6 @@ export default defineConfig((mode) => { optimizeDeps: { include: ["react-tweet"], }, + publicDir: "public", } satisfies UserConfig; }); diff --git a/apps/web/worker-configuration.d.ts b/apps/web/worker-configuration.d.ts index 357f87c6..d1327931 100644 --- a/apps/web/worker-configuration.d.ts +++ b/apps/web/worker-configuration.d.ts @@ -22,6 +22,7 @@ interface Env { NODE_ENV: string; STRIPE_CHECKOUT_KEY: string; STRIPE_WEBHOOK_SECRET: string; + STATIC_ASSETS: Fetcher } // global .env diff --git a/apps/web/wrangler.toml b/apps/web/wrangler.toml index 1ad14d06..7bffa41c 100644 --- a/apps/web/wrangler.toml +++ b/apps/web/wrangler.toml @@ -1,6 +1,6 @@ #:schema node_modules/wrangler/config-schema.json name = "supermemory-web" -compatibility_date = "2024-09-23" +compatibility_date = "2025-03-12" pages_build_output_dir = "./build/client" compatibility_flags = ["nodejs_compat"] |