mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
map_list: initial
urls: editing now handled through urls
This commit is contained in:
parent
3771e5d338
commit
0d9bad9095
23 changed files with 386 additions and 68 deletions
|
@ -1,12 +1,10 @@
|
|||
export const getPath = () => (window.location && window.location.pathname &&
|
||||
window.location.pathname.replace(/^\//, ''));
|
||||
import { history } from '$redux/store';
|
||||
|
||||
export const pushPath = url => window.history.pushState(url, 'Редактирование маршрута', url);
|
||||
export const getPath = () => (window.location && window.location.pathname);
|
||||
export const pushPath = url => history.push(url);
|
||||
|
||||
export const getUrlData = () => {
|
||||
const url = getPath();
|
||||
|
||||
const [path, mode] = url.split('/');
|
||||
export const getUrlData = (url = getPath()) => {
|
||||
const [, path, mode] = url.split('/');
|
||||
const { host } = window.location;
|
||||
|
||||
return { path, mode, host };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue