修復 pnpm run build 問題
This commit is contained in:
@@ -15,7 +15,7 @@ export default function SetIPPage() {
|
||||
const [error, setError] = useState<string>('');
|
||||
|
||||
// 設置客戶端 IP
|
||||
const setClientIP = async () => {
|
||||
const handleSetClientIP = async () => {
|
||||
if (!clientIP.trim()) {
|
||||
setError('請輸入客戶端 IP 地址');
|
||||
return;
|
||||
@@ -47,12 +47,12 @@ export default function SetIPPage() {
|
||||
};
|
||||
|
||||
// 快速設置你的 IP
|
||||
const setYourIP = () => {
|
||||
const handleSetYourIP = () => {
|
||||
setClientIP('61-227-253-171');
|
||||
};
|
||||
|
||||
// 測試清理功能
|
||||
const testCleanup = async () => {
|
||||
const handleTestCleanup = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const response = await fetch('/api/ip-cleanup', {
|
||||
@@ -110,7 +110,7 @@ export default function SetIPPage() {
|
||||
className="flex-1"
|
||||
/>
|
||||
<Button
|
||||
onClick={setYourIP}
|
||||
onClick={handleSetYourIP}
|
||||
disabled={loading}
|
||||
variant="outline"
|
||||
>
|
||||
@@ -121,7 +121,7 @@ export default function SetIPPage() {
|
||||
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
onClick={setClientIP}
|
||||
onClick={handleSetClientIP}
|
||||
disabled={loading || !clientIP.trim()}
|
||||
className="flex-1"
|
||||
>
|
||||
@@ -130,7 +130,7 @@ export default function SetIPPage() {
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
onClick={testCleanup}
|
||||
onClick={handleTestCleanup}
|
||||
disabled={loading}
|
||||
variant="destructive"
|
||||
className="flex-1"
|
||||
|
Reference in New Issue
Block a user