Alex Gleason 2023-01-05 16:42:18 -06:00
rodzic 85c25903f3
commit 3521e5698f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -3,7 +3,7 @@
import './precheck';
import * as OfflinePluginRuntime from '@lcdp/offline-plugin/runtime';
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { defineMessages } from 'react-intl';
import { setSwUpdating } from 'soapbox/actions/sw';
@ -34,9 +34,10 @@ function main() {
}
ready(() => {
const mountNode = document.getElementById('soapbox') as HTMLElement;
const container = document.getElementById('soapbox') as HTMLElement;
const root = createRoot(container);
ReactDOM.render(<Soapbox />, mountNode);
root.render(<Soapbox />);
if (BuildConfig.NODE_ENV === 'production') {
// avoid offline in dev mode because it's harder to debug