Shadcn Toast not showing using useEffect

Hello. I am trying to render a shadcn toast after a redirect from a server action, but first, I need to be able to render a toast on page load.
export default function Page() {
  const { toast } = useToast();
  useEffect(() => {
    console.log("hello");
    toast({
      title: "Test",
      description: "Test",
    });
  }, [toast]);

I can't figure out why this does not work... anyone here that has used this library might help?

Thanks in advance!
Was this page helpful?