Skip to content

🎥 Make videos programmatically with React

274 B
Raw Blame
import {useEffect} from 'react';

export default ({redirect}) => {
	useEffect(() => {
		if (typeof window === 'undefined') {
			return;
		}

		if (typeof window.location === 'undefined') {
			return;
		}

		window.location.href = redirect;
	}, [redirect]);
	return null;
};