From baf48af5f0a4b88642edc18ae8b16e81260e1846 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Tue, 6 Feb 2024 18:16:35 +0000 Subject: Implement metadata fetching logic in the crawler --- web/app/page.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'web/app/page.tsx') diff --git a/web/app/page.tsx b/web/app/page.tsx index 2df40508..b78fe389 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -1,7 +1,16 @@ +"use client"; + +import { useCallback } from "react"; import { LoginButton } from "../components/auth/login"; import { LogoutButton } from "../components/auth/logout"; export default function Home() { + const addUrl = useCallback(async () => { + await fetch("/api/v1/links", { + method: "POST", + body: JSON.stringify({ url: "https://news.ycombinator.com/news" }), + }); + }, []); return (
@@ -9,6 +18,9 @@ export default function Home() {

+
+
+
); -- cgit v1.2.3-70-g09d2