nicolium: remove markers actions

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-25 13:50:48 +01:00
parent cac38a33d1
commit c8abd676d9

View File

@ -1,36 +0,0 @@
import { getClient } from '../api';
import type { AppDispatch, RootState } from '@/store';
import type { Markers, SaveMarkersParams } from 'pl-api';
const MARKER_FETCH_SUCCESS = 'MARKER_FETCH_SUCCESS' as const;
const MARKER_SAVE_SUCCESS = 'MARKER_SAVE_SUCCESS' as const;
const fetchMarker =
(timeline: Array<string>) => (dispatch: AppDispatch, getState: () => RootState) =>
getClient(getState)
.timelines.getMarkers(timeline)
.then((marker) => {
dispatch<MarkersAction>({ type: MARKER_FETCH_SUCCESS, marker });
});
const saveMarker =
(marker: SaveMarkersParams) => (dispatch: AppDispatch, getState: () => RootState) =>
getClient(getState)
.timelines.saveMarkers(marker)
.then((marker) => {
dispatch<MarkersAction>({ type: MARKER_SAVE_SUCCESS, marker });
});
type MarkersAction =
| {
type: typeof MARKER_FETCH_SUCCESS;
marker: Markers;
}
| {
type: typeof MARKER_SAVE_SUCCESS;
marker: Markers;
};
export { MARKER_FETCH_SUCCESS, MARKER_SAVE_SUCCESS, fetchMarker, saveMarker, type MarkersAction };