udpate fetch data

This commit is contained in:
Nate Kelley 2025-03-11 11:07:18 -06:00
parent e34fdb5420
commit f763233114
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 8 additions and 2 deletions

View File

@ -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) => {

View File

@ -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 />
</> </>