"use client";

import { useEffect } from "react";
import { useAppDispatch } from "../hooks/useAppRedux";
import { setStateUser, User } from "../store/slices/user";

export default function StoreHydrator({ profile }: { profile: User }) {
  const dispatch = useAppDispatch();

  useEffect(() => {
    dispatch(setStateUser(profile));
  }, []);

  return null;
}
