import React, { useEffect } from 'react';
import { useRouter } from 'next/router';

import PlayerPreview from '@/modules/players/PlayerIframeView/components/PlayerPreview/PlayerPreview';

export default function Home() {
  const router = useRouter();

  useEffect(() => {
    if (window.top === window && !router.query.debug) {
      window.location.href = window.location.origin;
    }
  }, []);

  return <PlayerPreview />;
}
