Spaces:
Running
Running
File size: 597 Bytes
8c5cf8c 73322f4 8c5cf8c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
"use client";
import { useEffect } from "react";
export default function DomainRedirect() {
useEffect(() => {
if (typeof window === "undefined") return;
const host = window.location.host;
// Check if we're not on hf.co or huggingface.co
const isHfCo = host === "hf.co" || host.startsWith("hf.co:");
const isHuggingFaceCo =
host === "huggingface.co" || host.startsWith("huggingface.co:");
if (!isHfCo && !isHuggingFaceCo) {
// Redirect to the correct URL
window.location.replace("https://huggingface.co/deepsite");
}
}, []);
return null;
}
|