fix: useAxios 코드 정리
This commit is contained in:
parent
d410a8cd89
commit
bb0849c2d0
@ -2,7 +2,7 @@
|
||||
|
||||
import { Button, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@nextui-org/react'
|
||||
|
||||
import { AxiosType, useAxios } from '@/hooks/useAxios'
|
||||
import { useAxios } from '@/hooks/useAxios'
|
||||
// import { get } from '@/lib/Axios'
|
||||
|
||||
import QSelect from '@/components/ui/QSelect'
|
||||
@ -16,7 +16,6 @@ export default function changelogPage() {
|
||||
const handleUsers = async () => {
|
||||
// const users = await get('/api/user/find-all')
|
||||
const params = {
|
||||
type: AxiosType.INTERNAL,
|
||||
url: '/api/user/find-all',
|
||||
}
|
||||
const users = await get(params)
|
||||
|
||||
@ -72,7 +72,7 @@ export default function Intro() {
|
||||
async function fetchData() {
|
||||
// const response = await fetch('https://www.ag-grid.com/example-assets/space-mission-data.json')
|
||||
// const data = await response.json()
|
||||
const data = await get({ type: AxiosType.EXTERNAL, url: 'https://www.ag-grid.com/example-assets/space-mission-data.json' })
|
||||
const data = await get({ url: 'https://www.ag-grid.com/example-assets/space-mission-data.json' })
|
||||
setGridProps({ ...gridProps, gridData: data })
|
||||
}
|
||||
fetchData()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import axios, { Axios } from 'axios'
|
||||
|
||||
export const AxiosType = {
|
||||
const AxiosType = {
|
||||
INTERNAL: 'Internal',
|
||||
EXTERNAL: 'External',
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user