"use client";

import { useToast } from "@/components/toast";
import { TTCMD } from "@/components/ttcmd";
import { useEffect } from "react";
import { FC, use } from "react";

export const HomeClient: FC<{ body: Promise<string> }> = ({ body }) => {
  const text = use(body);

  const { createToast } = useToast();
  useEffect(() => {
    createToast({
      fading: false,
      msg: "TEST TOAST",
      type: "error",
    });
  }, [createToast]);

  return <TTCMD body={text} parserId="home" title="home" />;
};
