import { useState, useEffect } from "react";
import { API_URL } from "./constants";

export function BlogList() {
  const [content, setContent] = useState("");
  useEffect(() => {
    fetch(`${API_URL}/get-blogs`)
      .then((res) => res.text())
      .then(setContent);
  }, []);

  return <div>{content}</div>;
}
