* Use .js imports in src * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Additional * Add WP extension aliases * Bump dev * Additional * Additional * Adjust extensionAlias order
32 lines
827 B
TypeScript
32 lines
827 B
TypeScript
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// setup these right at front
|
|
import '@polkadot/apps/initSettings';
|
|
import 'semantic-ui-css/semantic.min.css';
|
|
import '@polkadot/react-components/i18n';
|
|
|
|
import React from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
|
|
import Root from '@polkadot/apps/Root';
|
|
|
|
import { electronMainApi } from './api/global-exported-api.js';
|
|
import { RemoteElectronStore } from './renderer/remote-electron-store.js';
|
|
|
|
const rootId = 'root';
|
|
const rootElement = document.getElementById(rootId);
|
|
|
|
if (!rootElement) {
|
|
throw new Error(`Unable to find element with id '${rootId}'`);
|
|
}
|
|
|
|
const store = new RemoteElectronStore(electronMainApi.accountStore);
|
|
|
|
createRoot(rootElement).render(
|
|
<Root
|
|
isElectron
|
|
store={store}
|
|
/>
|
|
);
|