mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Made settingsBaseURL global constant
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
a49d696c51
commit
22aed6c934
@ -42,6 +42,7 @@ import App from './containers/App';
|
||||
import LanguageProvider from './containers/LanguageProvider';
|
||||
|
||||
import configureStore from './configureStore';
|
||||
import { SETTINGS_BASE_URL } from './config';
|
||||
|
||||
// Import i18n messages
|
||||
import { translationMessages, languages } from './i18n';
|
||||
@ -64,7 +65,7 @@ Object.keys(plugins).forEach(current => {
|
||||
const currentPluginFn = plugins[current];
|
||||
const plugin = currentPluginFn({
|
||||
registerPlugin,
|
||||
settingsBaseURL: '/settings',
|
||||
settingsBaseURL: SETTINGS_BASE_URL,
|
||||
});
|
||||
|
||||
const pluginTradsPrefixed = languages.reduce((acc, lang) => {
|
||||
|
||||
@ -8,6 +8,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { get, snakeCase, isEmpty, map, sortBy } from 'lodash';
|
||||
import { SETTINGS_BASE_URL } from '../../config';
|
||||
import LeftMenuLink from '../LeftMenuLink';
|
||||
import Wrapper from './Wrapper';
|
||||
import messages from './messages.json';
|
||||
@ -116,7 +117,7 @@ function LeftMenuLinkContainer({ plugins, ...rest }) {
|
||||
{
|
||||
icon: 'cog',
|
||||
label: messages.settings.id,
|
||||
destination: '/settings',
|
||||
destination: SETTINGS_BASE_URL,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// DO NOT MODIFY THESE OPTIONS
|
||||
export const LOGIN_LOGO = null;
|
||||
export const SHOW_TUTORIALS = true;
|
||||
export const SETTINGS_BASE_URL = '/settings';
|
||||
|
||||
@ -19,7 +19,7 @@ import {
|
||||
LoadingIndicatorPage,
|
||||
OverlayBlocker,
|
||||
} from 'strapi-helper-plugin';
|
||||
import { SHOW_TUTORIALS } from '../../config';
|
||||
import { SETTINGS_BASE_URL, SHOW_TUTORIALS } from '../../config';
|
||||
|
||||
import Header from '../../components/Header/index';
|
||||
import Logout from '../../components/Logout';
|
||||
@ -150,7 +150,7 @@ export class Admin extends React.Component {
|
||||
enableGlobalOverlayBlocker={this.props.enableGlobalOverlayBlocker}
|
||||
formatMessage={this.props.intl.formatMessage}
|
||||
plugins={this.props.global.plugins}
|
||||
settingsBaseURL="/settings"
|
||||
settingsBaseURL={SETTINGS_BASE_URL}
|
||||
updatePlugin={this.props.updatePlugin}
|
||||
>
|
||||
<Wrapper>
|
||||
@ -187,7 +187,7 @@ export class Admin extends React.Component {
|
||||
render={props => this.renderRoute(props, SettingsPage)}
|
||||
/>
|
||||
<Route
|
||||
path="/settings"
|
||||
path={SETTINGS_BASE_URL}
|
||||
render={props => this.renderRoute(props, SettingsPage)}
|
||||
exact
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user