Vocal-rank/app/blocked/page.tsx
2025-02-12 11:37:45 +08:00

44 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { useEffect, useState } from "react"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import Link from "next/link"
export default function BlockedPage() {
const [countdown, setCountdown] = useState(3)
useEffect(() => {
const timer = setInterval(() => {
setCountdown((prev) => prev - 1)
}, 1000)
const redirect = setTimeout(() => {
window.location.href = "https://www.bilibili.com/video/BV1GJ411x7h7"
}, 3000)
return () => {
clearInterval(timer)
clearTimeout(redirect)
}
}, [])
return (
<div className="container mx-auto px-4 py-8">
<Card className="bg-red-100">
<CardHeader>
<CardTitle className="text-2xl font-bold text-red-600">访</CardTitle>
</CardHeader>
<CardContent>
<p className="text-red-500 mb-4">访</p>
<p className="text-gray-600 mb-4"> i@mei.lv</p>
<p className="text-gray-600 mb-4">{countdown} ...</p>
<Link href="/" className="text-blue-500 hover:underline">
</Link>
</CardContent>
</Card>
</div>
)
}