Skip to content

Commit fa937b1

Browse files
committed
refactor(ServerCard): 移除网络路由相关代码
删除 ServerCard 组件中与 plan.networkRoute 相关的字段验证和错误显示逻辑。
1 parent 4dc41e1 commit fa937b1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/components/server.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ export const ServerCard: React.FC<ServerCardProps> = ({ data, mutate }) => {
175175
| "plan.trafficType"
176176
| "plan.IPv4"
177177
| "plan.IPv6"
178-
| "plan.networkRoute"
179178
| "plan.extra",
180179
string
181180
>
@@ -216,9 +215,6 @@ export const ServerCard: React.FC<ServerCardProps> = ({ data, mutate }) => {
216215
if (!isDigits(pn.planDataMod.IPv6)) {
217216
errs["plan.IPv6"] = t("Validation.DigitsOnly")
218217
}
219-
if (!isDigits(pn.planDataMod.networkRoute)) {
220-
errs["plan.networkRoute"] = t("Validation.DigitsOnly")
221-
}
222218

223219
return { errors: errs, valid: Object.keys(errs).length === 0 }
224220
}
@@ -860,11 +856,6 @@ export const ServerCard: React.FC<ServerCardProps> = ({ data, mutate }) => {
860856
}))
861857
}
862858
/>
863-
{publicNoteErrors["plan.networkRoute"] && (
864-
<p className="text-xs text-destructive mt-1">
865-
{publicNoteErrors["plan.networkRoute"]}
866-
</p>
867-
)}
868859
</div>
869860
<div className="space-y-1 sm:col-span-2">
870861
<Label className="text-xs">

0 commit comments

Comments
 (0)