Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Mar 5, 2024
1 parent dad233e commit d28df4b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { allIps } from "~/consts";
import { useUserIPInfo } from "~/hooks/useUserIPInfo";
import { toast } from "react-hot-toast";
import { useEffect, useState } from "react";
import { useRouter } from 'next/router';
const UserIP = dynamic(() => import("~/components/UserIP"), { ssr: false });

const Home: NextPage = () => {
Expand Down Expand Up @@ -52,13 +51,6 @@ const Home: NextPage = () => {
setLoaded(true);
}, []);

const router = useRouter();
useEffect(() => {
if (window.location.protocol === 'https:') {
window.location.href = `http://${window.location.host}${router.asPath}`;
}
}, []);

if (!loaded) return;

return (
Expand Down

0 comments on commit d28df4b

Please sign in to comment.