mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
mod list colors and such
This commit is contained in:
@@ -1,29 +1,60 @@
|
||||
import React from 'react'
|
||||
import DownloadHandler from '../utils/download'
|
||||
import { ModHeader } from './components/mods/ModHeader'
|
||||
import { ModList } from './components/mods/ModList'
|
||||
import TopBar from './components/TopBar'
|
||||
|
||||
import './Mods.css'
|
||||
|
||||
interface IProps {
|
||||
downloadHandler: DownloadHandler
|
||||
}
|
||||
|
||||
interface IState {
|
||||
isDownloading: boolean
|
||||
category: string
|
||||
}
|
||||
|
||||
const headers = [
|
||||
{
|
||||
name: 'hot',
|
||||
title: 'Hot',
|
||||
},
|
||||
{
|
||||
name: 'new',
|
||||
title: 'New',
|
||||
},
|
||||
]
|
||||
|
||||
export class Mods extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
isDownloading: false,
|
||||
category: '',
|
||||
}
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
return
|
||||
}
|
||||
|
||||
async setCategory(value: string) {
|
||||
this.setState({
|
||||
category: value,
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<div className="Mods">
|
||||
<TopBar />
|
||||
</>
|
||||
|
||||
<ModHeader onChange={this.setCategory} headers={headers} defaultHeader={'hot'} />
|
||||
|
||||
<ModList sort={this.state.category} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user