|
1 | | -import { TextInput, Text } from '@mantine/core'; |
2 | | -import { IconTrashX } from '@tabler/icons-react'; |
3 | | -import classes from '../styles/Correlation.module.css'; |
4 | | -import { CorrelationFieldItem } from './CorrelationFieldItem'; |
5 | | -import { StreamSelectBox } from './StreamSelectBox'; |
6 | | -import { correlationStoreReducers, useCorrelationStore } from '../providers/CorrelationProvider'; |
7 | 1 | import { FC, useState } from 'react'; |
| 2 | +import { Text, TextInput } from '@mantine/core'; |
8 | 3 | import { appStoreReducers, useAppStore } from '@/layouts/MainLayout/providers/AppProvider'; |
| 4 | +import { correlationStoreReducers, useCorrelationStore } from '../providers/CorrelationProvider'; |
| 5 | + |
| 6 | +import { CorrelationFieldItem } from './CorrelationFieldItem'; |
| 7 | +import { IconTrashX } from '@tabler/icons-react'; |
| 8 | +import { StreamSelectBox } from './StreamSelectBox'; |
| 9 | +import classes from '../styles/Correlation.module.css'; |
9 | 10 |
|
10 | | -const { changeStream } = appStoreReducers; |
| 11 | +const { setStreamForCorrelation } = appStoreReducers; |
11 | 12 | const { setIsCorrelatedFlag, setSelectedFields, deleteStreamData } = correlationStoreReducers; |
12 | 13 |
|
13 | 14 | interface CorrelationSideBarProps { |
@@ -50,7 +51,7 @@ export const CorrelationSidebar: FC<CorrelationSideBarProps> = ({ |
50 | 51 | }; |
51 | 52 | const addStream = (value: string | null) => { |
52 | 53 | if (value) { |
53 | | - setAppStore((store) => changeStream(store, value)); |
| 54 | + setAppStore((store) => setStreamForCorrelation(store, value)); |
54 | 55 | } |
55 | 56 | }; |
56 | 57 |
|
@@ -94,7 +95,7 @@ export const CorrelationSidebar: FC<CorrelationSideBarProps> = ({ |
94 | 95 | cursor="pointer" |
95 | 96 | size={14} |
96 | 97 | onClick={() => { |
97 | | - setAppStore((store) => changeStream(store, '')); |
| 98 | + setAppStore((store) => setStreamForCorrelation(store, '')); |
98 | 99 | setCorrelationData((store) => setIsCorrelatedFlag(store, false)); |
99 | 100 | setSelect1Value({ value: null, dataType: '' }); |
100 | 101 | setSelect2Value({ value: null, dataType: '' }); |
|
0 commit comments