import * as Bun from "bun";
import { Suspense } from "react";
import { TwitterApiService } from "../lib/twitter-api";
import { BookmarkList } from "../components/bookmark-list";
async function BookmarkFetcher() {
const cookie = Bun.env.TWATTER_COKI;
if (!cookie) {
return (
Missing Twitter cookie configuration
);
}
try {
const twitterService = new TwitterApiService(cookie);
const bookmarks = await twitterService.fetchAllBookmarks();
const file = Bun.file("testData.json");
await file.write(JSON.stringify(bookmarks));
return (
);
} catch (error) {
return (
Error loading bookmarks:{" "}
{error instanceof Error ? error.message : "Unknown error"}
);
}
}
function LoadingSpinner() {
return (
Loading your Twitter bookmarks...
);
}
export default async function HomePage() {
return (
SORMARK - Twitter Bookmark Manager
SORMARK
Your Twitter bookmark manager powered by AI
}>
);
}
export const getConfig = async () => {
return {
render: "static",
} as const;
};