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