From bb817aa683d19904cd60f9c4ca10a5367bc2aca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Wed, 20 Jul 2016 15:51:49 -0300 Subject: [PATCH] moved to hash history --- src/actions/config.js | 3 +-- src/routing/basePath.js | 10 ---------- src/routing/history.js | 7 +++---- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 src/routing/basePath.js diff --git a/src/actions/config.js b/src/actions/config.js index 14c51e34..7a2d568f 100644 --- a/src/actions/config.js +++ b/src/actions/config.js @@ -2,7 +2,6 @@ import yaml from 'js-yaml'; import { currentBackend } from '../backends/backend'; import { authenticate } from '../actions/auth'; import * as MediaProxy from '../valueObjects/MediaProxy'; -import basePath from '../routing/basePath'; export const CONFIG_REQUEST = 'CONFIG_REQUEST'; export const CONFIG_SUCCESS = 'CONFIG_SUCCESS'; @@ -44,7 +43,7 @@ export function loadConfig(config) { return (dispatch, getState) => { dispatch(configLoading()); - fetch(`${basePath}/config.yml`).then((response) => { + fetch('config.yml').then((response) => { if (response.status !== 200) { throw `Failed to load config.yml (${response.status})`; } diff --git a/src/routing/basePath.js b/src/routing/basePath.js deleted file mode 100644 index d00abe17..00000000 --- a/src/routing/basePath.js +++ /dev/null @@ -1,10 +0,0 @@ -const base = document.querySelector('base'); - -let basePath; -if (base && base.href) { - basePath = base.attributes.getNamedItem('href').value; -} else { - basePath = ''; -} - -export default basePath; diff --git a/src/routing/history.js b/src/routing/history.js index 4825aba1..a7ec5dbf 100644 --- a/src/routing/history.js +++ b/src/routing/history.js @@ -1,10 +1,9 @@ -import { createHistory } from 'history'; +import { createHashHistory } from 'history'; import { useRouterHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; -import basePath from './basePath'; -let history = useRouterHistory(createHistory)({ - basename: basePath +let history = useRouterHistory(createHashHistory)({ + queryKey: false }); const syncHistory = (store) => {