moved to hash history
This commit is contained in:
parent
d7324bd743
commit
bb817aa683
@ -2,7 +2,6 @@ import yaml from 'js-yaml';
|
|||||||
import { currentBackend } from '../backends/backend';
|
import { currentBackend } from '../backends/backend';
|
||||||
import { authenticate } from '../actions/auth';
|
import { authenticate } from '../actions/auth';
|
||||||
import * as MediaProxy from '../valueObjects/MediaProxy';
|
import * as MediaProxy from '../valueObjects/MediaProxy';
|
||||||
import basePath from '../routing/basePath';
|
|
||||||
|
|
||||||
export const CONFIG_REQUEST = 'CONFIG_REQUEST';
|
export const CONFIG_REQUEST = 'CONFIG_REQUEST';
|
||||||
export const CONFIG_SUCCESS = 'CONFIG_SUCCESS';
|
export const CONFIG_SUCCESS = 'CONFIG_SUCCESS';
|
||||||
@ -44,7 +43,7 @@ export function loadConfig(config) {
|
|||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch(configLoading());
|
dispatch(configLoading());
|
||||||
|
|
||||||
fetch(`${basePath}/config.yml`).then((response) => {
|
fetch('config.yml').then((response) => {
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw `Failed to load config.yml (${response.status})`;
|
throw `Failed to load config.yml (${response.status})`;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
|
@ -1,10 +1,9 @@
|
|||||||
import { createHistory } from 'history';
|
import { createHashHistory } from 'history';
|
||||||
import { useRouterHistory } from 'react-router';
|
import { useRouterHistory } from 'react-router';
|
||||||
import { syncHistoryWithStore } from 'react-router-redux';
|
import { syncHistoryWithStore } from 'react-router-redux';
|
||||||
import basePath from './basePath';
|
|
||||||
|
|
||||||
let history = useRouterHistory(createHistory)({
|
let history = useRouterHistory(createHashHistory)({
|
||||||
basename: basePath
|
queryKey: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const syncHistory = (store) => {
|
const syncHistory = (store) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user