🐛 fix: Remove unused ratio variable from server traffic log and server form for cleaner code

This commit is contained in:
web 2025-09-28 09:01:03 -07:00
parent 6a823b8faa
commit 55034dc97d
3 changed files with 0 additions and 5 deletions

View File

@ -41,13 +41,10 @@ export default function ServerTrafficLogPage() {
accessorKey: 'server_id', accessorKey: 'server_id',
header: t('column.server'), header: t('column.server'),
cell: ({ row }) => { cell: ({ row }) => {
const server = getServerById(row.original.server_id);
const ratio = server?.ratio || 1;
return ( return (
<div className='flex items-center gap-2'> <div className='flex items-center gap-2'>
<Badge>{row.original.server_id}</Badge> <Badge>{row.original.server_id}</Badge>
<span>{getServerName(row.original.server_id)}</span> <span>{getServerName(row.original.server_id)}</span>
<Badge variant='outline'>{ratio}X</Badge>
</div> </div>
); );
}, },

View File

@ -286,7 +286,6 @@ export default function ServersPage() {
setLoading(true); setLoading(true);
const { id, created_at, updated_at, last_reported_at, status, ...others } = const { id, created_at, updated_at, last_reported_at, status, ...others } =
row as any; row as any;
// @ts-expect-error
const body: API.CreateServerRequest = { const body: API.CreateServerRequest = {
name: others.name, name: others.name,
country: others.country, country: others.country,

View File

@ -353,7 +353,6 @@ export default function ServerForm(props: {
address: '', address: '',
country: '', country: '',
city: '', city: '',
ratio: 1,
...initialValues, ...initialValues,
protocols: PROTOCOLS.map((type) => { protocols: PROTOCOLS.map((type) => {
const existingProtocol = initialValues.protocols?.find((p) => p.type === type); const existingProtocol = initialValues.protocols?.find((p) => p.type === type);