Upgrade react-intl (#24906)
This commit is contained in:
parent
00c222377d
commit
44cd88adc4
130 changed files with 413 additions and 5046 deletions
|
@ -1,10 +1,11 @@
|
|||
import './public-path';
|
||||
import { start } from '../mastodon/common';
|
||||
import { loadLocale } from '../mastodon/load_locale';
|
||||
import { loadPolyfills } from '../mastodon/polyfills';
|
||||
|
||||
start();
|
||||
|
||||
loadPolyfills().then(async () => {
|
||||
loadPolyfills().then(loadLocale).then(async () => {
|
||||
const { default: main } = await import('mastodon/main');
|
||||
|
||||
return main();
|
||||
|
|
|
@ -2,7 +2,7 @@ import { createRoot } from 'react-dom/client';
|
|||
|
||||
import './public-path';
|
||||
|
||||
import * as IntlMessageFormat from 'intl-messageformat';
|
||||
import { IntlMessageFormat } from 'intl-messageformat';
|
||||
import { defineMessages } from 'react-intl';
|
||||
|
||||
import { delegate } from '@rails/ujs';
|
||||
|
@ -15,6 +15,7 @@ import { start } from '../mastodon/common';
|
|||
import { timeAgoString } from '../mastodon/components/relative_timestamp';
|
||||
import emojify from '../mastodon/features/emoji/emoji';
|
||||
import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
|
||||
import { loadLocale } from '../mastodon/load_locale';
|
||||
import { getLocale } from '../mastodon/locales';
|
||||
import { loadPolyfills } from '../mastodon/polyfills';
|
||||
import ready from '../mastodon/ready';
|
||||
|
@ -46,7 +47,7 @@ window.addEventListener('message', e => {
|
|||
});
|
||||
|
||||
function loaded() {
|
||||
const { localeData } = getLocale();
|
||||
const { messages: localeData } = getLocale();
|
||||
|
||||
const scrollToDetailedStatus = () => {
|
||||
const history = createBrowserHistory();
|
||||
|
@ -352,6 +353,7 @@ function main() {
|
|||
}
|
||||
|
||||
loadPolyfills()
|
||||
.then(loadLocale)
|
||||
.then(main)
|
||||
.then(loadKeyboardExtensions)
|
||||
.catch(error => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import './public-path';
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import { start } from '../mastodon/common';
|
||||
import ComposeContainer from '../mastodon/containers/compose_container';
|
||||
import { loadLocale } from '../mastodon/load_locale';
|
||||
import { loadPolyfills } from '../mastodon/polyfills';
|
||||
import ready from '../mastodon/ready';
|
||||
|
||||
|
@ -26,6 +26,6 @@ function main() {
|
|||
ready(loaded);
|
||||
}
|
||||
|
||||
loadPolyfills().then(main).catch(error => {
|
||||
loadPolyfills().then(loadLocale).then(main).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue