Skip to content

Commit

Permalink
fix: refactor the data object to state
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed May 10, 2023
1 parent 8a5c030 commit dd1d69a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NMRiumWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function NMRiumWrapper() {
const [data, setDate] = useState<NMRiumData>();
const { workspace, preferences } = usePreferences();
const dataChangeHandler = useCallback<OnNMRiumChange>((state, source) => {
events.trigger('data-change', { data: state, source });
events.trigger('data-change', { state, source });
}, []);

const { load: loadSpectra, isLoading, data: loadedData } = useLoadSpectra();
Expand Down
2 changes: 1 addition & 1 deletion src/events/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type ActionResponse = {
};

type DataChange = {
data: NmriumState;
state: NmriumState;
source: 'data' | 'view' | 'settings';
};

Expand Down

0 comments on commit dd1d69a

Please sign in to comment.