mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 00:24:45 +01:00
make App() class
This commit is contained in:
@@ -11,6 +11,14 @@ import ServerLaunchSection from './components/ServerLaunchSection'
|
||||
import ProgressBar from './components/common/ProgressBar'
|
||||
import MainProgressBar from './components/common/MainProgressBar'
|
||||
|
||||
interface IProps {
|
||||
[key: string]: never
|
||||
}
|
||||
|
||||
interface IState {
|
||||
isDownloading: boolean
|
||||
}
|
||||
|
||||
const downloadHandler = new DownloadHandler()
|
||||
|
||||
async function download(url: string, filename: string, path: string) {
|
||||
@@ -26,20 +34,29 @@ async function TESTDOWNLOAD() {
|
||||
)
|
||||
}
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Topbar />
|
||||
class App extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps) {
|
||||
super(props)
|
||||
this.state = {
|
||||
isDownloading: false,
|
||||
}
|
||||
}
|
||||
|
||||
<button onClick={TESTDOWNLOAD}>download file test</button>
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Topbar />
|
||||
|
||||
<ServerLaunchSection />
|
||||
<button onClick={TESTDOWNLOAD}>download file test</button>
|
||||
|
||||
<div id="DownloadProgress">
|
||||
<MainProgressBar downloadManager={downloadHandler} />
|
||||
<ServerLaunchSection />
|
||||
|
||||
<div id="DownloadProgress">
|
||||
<MainProgressBar downloadManager={downloadHandler} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
||||
|
||||
Reference in New Issue
Block a user