aboutsummaryrefslogtreecommitdiff
path: root/core/search-component/src/main/components/root.tsx
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-05-28 16:17:13 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-04 11:25:34 +0200
commitb614604effda51ca7c76c8901be78ced62b642b2 (patch)
tree971fc02905cf3e0c75ef4fb00d93ce72b43936cb /core/search-component/src/main/components/root.tsx
parent4065a65fe3294e0ddf54f5756380f7dc1aa032b2 (diff)
downloaddokka-b614604effda51ca7c76c8901be78ced62b642b2.tar.gz
dokka-b614604effda51ca7c76c8901be78ced62b642b2.tar.bz2
dokka-b614604effda51ca7c76c8901be78ced62b642b2.zip
Update TS migration to current dev, move to a common package, rename to frontend
Diffstat (limited to 'core/search-component/src/main/components/root.tsx')
-rw-r--r--core/search-component/src/main/components/root.tsx43
1 files changed, 0 insertions, 43 deletions
diff --git a/core/search-component/src/main/components/root.tsx b/core/search-component/src/main/components/root.tsx
deleted file mode 100644
index 70ed9550..00000000
--- a/core/search-component/src/main/components/root.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from 'react';
-import {render} from 'react-dom';
-import RedBox from 'redbox-react';
-
-import App from "./app";
-import './app/index.scss';
-
-const appEl = document.getElementById('searchBar');
-const rootEl = document.createElement('div');
-
-let renderApp = () => {
- render(
- <App/>,
- rootEl
- );
-};
-
-// @ts-ignore
-if (module.hot) {
- const renderAppHot = renderApp;
- const renderError = (error: Error) => {
- render(
- <RedBox error={error}/>,
- rootEl
- );
- };
-
- renderApp = () => {
- try {
- renderAppHot();
- } catch (error) {
- renderError(error);
- }
- };
-
- // @ts-ignore
- module.hot.accept('./app', () => {
- setTimeout(renderApp);
- });
-}
-
-renderApp();
-appEl!.appendChild(rootEl);