Files
e22ea573-e983-4204-b780-532…/src/components/cardStack/hooks/useCardAnimation.ts

13 lines
297 B
TypeScript

import { useEffect, useState } from "react";
export function useCardAnimation() {
const [mounted, setMounted] = useState(false);
const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
useEffect(() => {
setMounted(true);
}, []);
return { mounted, isMobile };
}