Skip to content

Commit

Permalink
🐛 import react and react-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX authored Jun 6, 2022
1 parent f573cd7 commit 04b9bb8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
- run: npm i esbuild -g
- run: npm i
- run: chmod +x ./build.sh && mkdir -p ./assets/js/ && ./build.sh
- run: mkdir ./vendor && wget https://github.com/tencentyun/cos-php-sdk-v5/releases/download/v2.3.4/cos-sdk-v5-7.phar -O ./vendor/cos-sdk-v5-7.phar
- name: Make file
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
vendor
assets
assets
node_modules
yarn.lock
package-lock.json
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
"fa": "shield-alt",
"bg": "yellow"
}
},
"dependencies": {
"react": "^18.1.0",
"react-dom": "^18.1.0"
}
}
3 changes: 1 addition & 2 deletions views/components/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-ignore
const React = window.React
import React from 'react'
// @ts-ignore
const t = window.trans
import PaginationItem from './PaginationItem'
Expand Down
3 changes: 1 addition & 2 deletions views/components/PaginationItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-ignore
const React = window.React
import React from 'react'

interface Props {
disabled?: boolean
Expand Down
4 changes: 2 additions & 2 deletions views/moderation.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const React = window.React
const ReactDOM = window.ReactDOM
import React from 'react'
import ReactDOM from 'react-dom'
const bsFetch = window.blessing.fetch
const toast = window.blessing.notify.toast
import Pagination from './components/Pagination'
Expand Down

0 comments on commit 04b9bb8

Please sign in to comment.