mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
cleaned out user reducer
This commit is contained in:
parent
103097edbd
commit
af8d270460
13 changed files with 462 additions and 282 deletions
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios/index';
|
||||
import { API } from '$constants/api';
|
||||
import { IRootState, IRouteListItem, IRoute } from '$redux/user';
|
||||
import { IRootState, IRouteListItem } from '$redux/user';
|
||||
import { IUser } from '$constants/auth';
|
||||
import { CLIENT } from '$config/frontend';
|
||||
import { LatLngLiteral } from 'leaflet';
|
||||
|
@ -10,6 +10,7 @@ import {
|
|||
IResultWithStatus,
|
||||
configWithToken,
|
||||
} from './middleware';
|
||||
import { IRoute } from '$redux/map/types';
|
||||
|
||||
const arrayToObject = (array: any[], key: string): {} =>
|
||||
array.reduce((obj, el) => ({ ...obj, [el[key]]: el }), {});
|
||||
|
@ -63,7 +64,7 @@ export const getGuestToken = (): Promise<IResultWithStatus<{
|
|||
export const getStoredMap = ({
|
||||
name,
|
||||
}: {
|
||||
name: IRootState['address'];
|
||||
name: IRoute['address'];
|
||||
}): Promise<IResultWithStatus<{
|
||||
route: IRoute;
|
||||
error?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue