|
@ -1,8 +1,8 @@ |
|
|
import { Button, Card, Flex, Grid, Group, ScrollAreaAutosize, Stack, Tabs, Text } from '@mantine/core' |
|
|
|
|
|
|
|
|
import { Stack, Tabs } from '@mantine/core' |
|
|
import useSWR from 'swr' |
|
|
import useSWR from 'swr' |
|
|
import { BASE_URL } from '../constants' |
|
|
import { BASE_URL } from '../constants' |
|
|
import { fetcher } from '../http/axiosInstance' |
|
|
import { fetcher } from '../http/axiosInstance' |
|
|
import { useEffect, useState } from 'react' |
|
|
|
|
|
|
|
|
import { useState } from 'react' |
|
|
import CustomTable from '../components/CustomTable' |
|
|
import CustomTable from '../components/CustomTable' |
|
|
|
|
|
|
|
|
const DBManager = () => { |
|
|
const DBManager = () => { |
|
@ -49,8 +49,8 @@ const DBManager = () => { |
|
|
const TableData = ({ |
|
|
const TableData = ({ |
|
|
tablename |
|
|
tablename |
|
|
}: { tablename: string }) => { |
|
|
}: { tablename: string }) => { |
|
|
const [offset, setOffset] = useState(0) |
|
|
|
|
|
const [limit, setLimit] = useState(20) |
|
|
|
|
|
|
|
|
const [offset] = useState(0) |
|
|
|
|
|
const [limit] = useState(20) |
|
|
|
|
|
|
|
|
const { data: columnsData } = useSWR(`/db/columns/${tablename}`, (key) => fetcher(key, BASE_URL.ems), { |
|
|
const { data: columnsData } = useSWR(`/db/columns/${tablename}`, (key) => fetcher(key, BASE_URL.ems), { |
|
|
revalidateOnFocus: false |
|
|
revalidateOnFocus: false |
|
|