From 1edc0e1ccf15a0c8ff50df9b0daa3ead0ad1dcd4 Mon Sep 17 00:00:00 2001 From: Mukul Jain Date: Fri, 14 May 2021 00:45:08 +0530 Subject: [PATCH] feat: add useScript, react cdn's --- .babelrc | 18 ++------- src/App.tsx | 1 + src/index.html | 9 +++++ src/index.tsx | 4 +- src/utils/hooks/useScript/index.ts | 63 ++++++++++++++++++++++++++++++ tsconfig.json | 5 +-- webpack.common.ts | 16 ++++++++ 7 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 src/utils/hooks/useScript/index.ts diff --git a/.babelrc b/.babelrc index 6ea5938..8e66666 100644 --- a/.babelrc +++ b/.babelrc @@ -1,16 +1,4 @@ { - "presets": [ - "@babel/preset-env", - "@babel/preset-typescript", - "@babel/react" - ], - "plugins": [ - "@babel/plugin-proposal-class-properties", - [ - "@babel/plugin-transform-typescript", - { - "allowNamespaces": true - } - ] - ] -} \ No newline at end of file + "presets": ["@babel/preset-env", "@babel/preset-typescript", "@babel/react"], + "plugins": ["@babel/plugin-proposal-class-properties"] +} diff --git a/src/App.tsx b/src/App.tsx index 70ffd67..e7bd5fb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,6 +13,7 @@ import { openApp, closeApp, bringToTop } from "base/store"; const App = () => { // move to more apporpiate place + React.useEffect(() => { // init global object window.os = { diff --git a/src/index.html b/src/index.html index 0e583d1..3b18d02 100644 --- a/src/index.html +++ b/src/index.html @@ -7,12 +7,21 @@ href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> + + +