🐛 fix: Remove unused ratio variable from server traffic log and server form for cleaner code
This commit is contained in:
parent
6a823b8faa
commit
55034dc97d
@ -41,13 +41,10 @@ export default function ServerTrafficLogPage() {
|
||||
accessorKey: 'server_id',
|
||||
header: t('column.server'),
|
||||
cell: ({ row }) => {
|
||||
const server = getServerById(row.original.server_id);
|
||||
const ratio = server?.ratio || 1;
|
||||
return (
|
||||
<div className='flex items-center gap-2'>
|
||||
<Badge>{row.original.server_id}</Badge>
|
||||
<span>{getServerName(row.original.server_id)}</span>
|
||||
<Badge variant='outline'>{ratio}X</Badge>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
@ -286,7 +286,6 @@ export default function ServersPage() {
|
||||
setLoading(true);
|
||||
const { id, created_at, updated_at, last_reported_at, status, ...others } =
|
||||
row as any;
|
||||
// @ts-expect-error
|
||||
const body: API.CreateServerRequest = {
|
||||
name: others.name,
|
||||
country: others.country,
|
||||
|
||||
@ -353,7 +353,6 @@ export default function ServerForm(props: {
|
||||
address: '',
|
||||
country: '',
|
||||
city: '',
|
||||
ratio: 1,
|
||||
...initialValues,
|
||||
protocols: PROTOCOLS.map((type) => {
|
||||
const existingProtocol = initialValues.protocols?.find((p) => p.type === type);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user