mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 09:04:45 +01:00
interepret API response
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import React from 'react'
|
||||
import { getMods } from '../../../utils/gamebanana'
|
||||
import { LoadingCircle } from './LoadingCircle'
|
||||
|
||||
import './ModList.css'
|
||||
|
||||
interface IProps {
|
||||
sort: string
|
||||
mode: string
|
||||
}
|
||||
|
||||
interface IState {
|
||||
@@ -16,6 +17,14 @@ export class ModList extends React.Component<IProps, IState> {
|
||||
super(props)
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
if (this.props.mode === 'installed') return
|
||||
|
||||
const mods = await getMods(this.props.mode)
|
||||
|
||||
console.log(mods)
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="ModList">
|
||||
|
||||
Reference in New Issue
Block a user