mirror of https://github.com/buster-so/buster.git
udpate fetch data
This commit is contained in:
parent
e34fdb5420
commit
f763233114
|
@ -30,7 +30,7 @@ export const listMetrics_server = async (params: ListMetricsParams) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getMetricData = async ({ id }: { id: string }) => {
|
export const getMetricData = async ({ id }: { id: string }) => {
|
||||||
return mainApi.get<BusterMetricData>(`/metrics/data/${id}`).then((res) => res.data);
|
return mainApi.get<BusterMetricData>(`/metrics/${id}/data`).then((res) => res.data);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateMetric = async (params: UpdateMetricParams) => {
|
export const updateMetric = async (params: UpdateMetricParams) => {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { useAppLayoutContextSelector } from '@/context/BusterAppLayout';
|
||||||
import { SupportModal } from '../modal/SupportModal';
|
import { SupportModal } from '../modal/SupportModal';
|
||||||
import { InvitePeopleModal } from '../modal/InvitePeopleModal';
|
import { InvitePeopleModal } from '../modal/InvitePeopleModal';
|
||||||
import { useMemoizedFn } from '@/hooks';
|
import { useMemoizedFn } from '@/hooks';
|
||||||
|
import { SidebarUserFooter } from './SidebarUserFooter/SidebarUserFooter';
|
||||||
|
|
||||||
const topItems: ISidebarList = {
|
const topItems: ISidebarList = {
|
||||||
items: [
|
items: [
|
||||||
|
@ -130,7 +131,12 @@ export const SidebarPrimary = React.memo(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Sidebar content={sidebarItems} header={<SidebarPrimaryHeader />} activeItem={currentRoute} />
|
<Sidebar
|
||||||
|
content={sidebarItems}
|
||||||
|
header={<SidebarPrimaryHeader />}
|
||||||
|
activeItem={currentRoute}
|
||||||
|
footer={<SidebarUserFooter />}
|
||||||
|
/>
|
||||||
|
|
||||||
<GlobalModals />
|
<GlobalModals />
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue