mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-20 00:27:22 +08:00
organize imports in the front end
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import queryRemoteFile from '@/api/admin/tools/queryRemoteFile'
|
||||
import Button from '@/components/elements/Button'
|
||||
import { NodeContext } from '@/state/admin/node'
|
||||
import { useState } from 'react'
|
||||
import { useFormContext } from 'react-hook-form'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import useNodeSWR from '@/api/admin/nodes/useNodeSWR'
|
||||
import queryRemoteFile from '@/api/admin/tools/queryRemoteFile'
|
||||
|
||||
import Button from '@/components/elements/Button'
|
||||
|
||||
const QueryFileButton = () => {
|
||||
const { getValues, setError, setValue } = useFormContext()
|
||||
@@ -22,7 +24,9 @@ const QueryFileButton = () => {
|
||||
setValue('fileName', metadata.fileName)
|
||||
} catch {
|
||||
setError('link', {
|
||||
message: t('create_modal.fail_to_query_remote_file_error') ?? 'Failed to query remote file.',
|
||||
message:
|
||||
t('create_modal.fail_to_query_remote_file_error') ??
|
||||
'Failed to query remote file.',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -30,7 +34,12 @@ const QueryFileButton = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Button variant='filled' loading={loading} onClick={query} className='mt-[1.625rem]'>
|
||||
<Button
|
||||
variant='filled'
|
||||
loading={loading}
|
||||
onClick={query}
|
||||
className='mt-[1.625rem]'
|
||||
>
|
||||
{tStrings('query')}
|
||||
</Button>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user