Merge branch 'big-nate/bus-939-create-new-structure-for-chats' into nate/create-component-library

This commit is contained in:
Nate Kelley 2025-02-25 13:22:47 -07:00
commit 780f9a489b
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
7 changed files with 13 additions and 15 deletions

View File

@ -35,6 +35,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tailwindcss/forms": "^0.5.10",
"@tanstack/react-query": "^5.66.9",
"@tanstack/react-query-devtools": "^5.66.9",
"@vercel/speed-insights": "^1.2.0",
"ahooks": "^3.8.4",
"antd": "5.23.3",
@ -116,7 +117,8 @@
"@storybook/nextjs": "^8.5.8",
"@storybook/react": "^8.5.8",
"@storybook/test": "^8.5.8",
"@tailwindcss/postcss": "^4.0.8",
"@tailwindcss/postcss": "^4.0.9",
"@tanstack/eslint-plugin-query": "^5.66.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",

View File

@ -7,6 +7,7 @@ import { defaultRequestHandler } from '@/api/createInstance';
import nextApi from '@/api/next/instances';
import { useSupabaseContext } from '../Supabase/SupabaseContextProvider';
import { getQueryClient } from './getQueryClient';
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools';
export const BusterReactQueryProvider = ({ children }: { children: React.ReactElement }) => {
const accessToken = useSupabaseContext((state) => state.accessToken);
@ -20,5 +21,10 @@ export const BusterReactQueryProvider = ({ children }: { children: React.ReactEl
nextApi.interceptors.request.use((v) => defaultRequestHandler(v, { accessToken }));
}, [accessToken]);
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
return (
<QueryClientProvider client={queryClient}>
{children}
<ReactQueryDevtoolsPanel />
</QueryClientProvider>
);
};

View File

@ -1,11 +1,9 @@
import { useBusterWebSocket } from '@/context/BusterWebSocket';
import { useMemoizedFn } from 'ahooks';
import { useTransition, type MutableRefObject } from 'react';
import { useTransition } from 'react';
import type { IBusterChat, IBusterChatMessage } from '../interfaces';
import { useSocketQueryMutation } from '@/api/buster_socket_query';
import { useQueryClient } from '@tanstack/react-query';
import { queryKeys } from '@/api/query_keys';
import { create } from 'mutative';
export const useChatUpdate = () => {
const [isPending, startTransition] = useTransition();

View File

@ -6,7 +6,6 @@ import {
import { queryKeys } from '@/api/query_keys';
import { DashboardUpdate } from '@/api/buster_socket/dashboards';
import { useBusterWebSocket } from '@/context/BusterWebSocket';
import { useSocketQueryMutation } from '@/api/buster_socket_query';
import { useMemoizedFn } from 'ahooks';
import { create } from 'mutative';

View File

@ -32,9 +32,7 @@ const useBusterMetricsIndividual = () => {
return resolveEmptyMetric(data, _metricId);
});
//STATE UPDATERS
// EMITTERS
// STATE UPDATERS
const metricUpdateConfig = useUpdateMetricConfig({
getMetricId,

View File

@ -1,10 +1,7 @@
import { useMemoizedFn } from 'ahooks';
import last from 'lodash/last';
import { IBusterMetric } from '../interfaces';
import { useBusterWebSocket } from '../../BusterWebSocket';
import { useUserConfigContextSelector } from '../../Users';
import { useBusterNotifications } from '../../BusterNotifications';
import { useBusterDashboardContextSelector } from '../../Dashboards';
import { useUpdateMetricConfig } from './useMetricUpdateConfig';
export const useUpdateMetricAssosciations = ({
@ -56,8 +53,6 @@ export const useUpdateMetricAssosciations = ({
dashboardId: string;
useConfirmModal?: boolean;
}) => {
// const prev = metricsRef.current;
const method = async () => {
await updateMetricMutation({
id: metricId,

View File

@ -3,7 +3,7 @@ import type { IBusterMetric } from '../interfaces';
import {
BusterMetric,
DEFAULT_CHART_CONFIG,
IBusterMetricChartConfig,
type IBusterMetricChartConfig,
ShareRole,
VerificationStatus
} from '@/api/asset_interfaces';