mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Clean up
This commit is contained in:
parent
00b2a159c1
commit
e2cba32b15
6 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
import { Components, registerComponent, getSetting, Strings, runCallbacks } from 'meteor/vulcan:lib';
|
||||
import { Components, registerComponent, getSetting, Strings, runCallbacks, detectLocale } from 'meteor/vulcan:lib';
|
||||
import React, { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { IntlProvider, intlShape, detectLocale } from 'meteor/vulcan:i18n';
|
||||
import { IntlProvider, intlShape } from 'meteor/vulcan:i18n';
|
||||
import withCurrentUser from '../containers/withCurrentUser.js';
|
||||
|
||||
class App extends PureComponent {
|
||||
|
|
|
@ -4,5 +4,4 @@ registerSetting('locale', 'en', 'Your app\'s locale (“en”, “fr”, etc.)')
|
|||
|
||||
export { default as FormattedMessage } from './message.js';
|
||||
export { intlShape } from './shape.js';
|
||||
export * from './detect.js';
|
||||
export { default as IntlProvider } from './provider.js';
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
|
||||
Helper to detect current browser locale
|
||||
|
||||
*/
|
||||
export const detectLocale = () => {
|
||||
var lang
|
||||
|
|
@ -28,4 +28,5 @@ export * from './debug.js';
|
|||
export * from './startup.js';
|
||||
export * from './errors.js';
|
||||
export * from './intl.js';
|
||||
export * from './detect_locale.js';
|
||||
// export * from './resolvers.js';
|
||||
|
|
|
@ -111,8 +111,6 @@ function sendSSRHtml(options, req, res, next, renderProps) {
|
|||
|
||||
req.dynamicBody += `<${options.rootElementType || 'div'} id="${options.rootElement || 'react-app'}"${rootElementAttributes}>${html || ''}</${options.rootElementType || 'div'}>`;
|
||||
|
||||
console.log(req.headers['accept-language'])
|
||||
|
||||
if (typeof options.htmlHook === 'function') {
|
||||
const { dynamicHead, dynamicBody } = options.htmlHook(req, res, req.dynamicHead, req.dynamicBody);
|
||||
req.dynamicHead = dynamicHead;
|
||||
|
|
Loading…
Add table
Reference in a new issue