mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
Lint
This commit is contained in:
@@ -17,11 +17,11 @@ interface IState {
|
||||
horny: boolean
|
||||
modList: ModData[] | null
|
||||
installedList:
|
||||
| {
|
||||
path: string
|
||||
info: ModData | PartialModData
|
||||
}[]
|
||||
| null
|
||||
| {
|
||||
path: string
|
||||
info: ModData | PartialModData
|
||||
}[]
|
||||
| null
|
||||
}
|
||||
|
||||
export class ModList extends React.Component<IProps, IState> {
|
||||
@@ -82,21 +82,21 @@ export class ModList extends React.Component<IProps, IState> {
|
||||
return (
|
||||
<div className="ModList">
|
||||
{(this.state.modList && this.props.mode !== 'installed') ||
|
||||
(this.state.installedList && this.props.mode === 'installed') ? (
|
||||
(this.state.installedList && this.props.mode === 'installed') ? (
|
||||
<div className="ModListInner">
|
||||
{this.props.mode === 'installed'
|
||||
? this.state.installedList?.map((mod) => (
|
||||
<ModTile
|
||||
horny={this.state.horny}
|
||||
path={mod.path}
|
||||
mod={mod.info}
|
||||
key={mod.info.name}
|
||||
onClick={this.downloadMod}
|
||||
/>
|
||||
))
|
||||
<ModTile
|
||||
horny={this.state.horny}
|
||||
path={mod.path}
|
||||
mod={mod.info}
|
||||
key={mod.info.name}
|
||||
onClick={this.downloadMod}
|
||||
/>
|
||||
))
|
||||
: this.state.modList?.map((mod: ModData) => (
|
||||
<ModTile horny={this.state.horny} mod={mod} key={mod.id} onClick={this.downloadMod} />
|
||||
))}
|
||||
<ModTile horny={this.state.horny} mod={mod} key={mod.id} onClick={this.downloadMod} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<LoadingCircle />
|
||||
|
||||
@@ -129,18 +129,18 @@ export async function getMods(mode: string, page: number, search: string) {
|
||||
await invoke('list_submissions', {
|
||||
mode,
|
||||
page: '' + page,
|
||||
search: search
|
||||
search: search,
|
||||
})
|
||||
)
|
||||
|
||||
const total = resp._aMetadata._nRecordCount
|
||||
|
||||
if (page > (total / 15)) hadMods = false
|
||||
if (page > total / 15) hadMods = false
|
||||
|
||||
modList = [...modList, ...resp._aRecords]
|
||||
page++
|
||||
}
|
||||
|
||||
|
||||
return formatGamebananaData(modList)
|
||||
}
|
||||
|
||||
@@ -169,8 +169,8 @@ export async function formatGamebananaData(obj: GamebananaResponse[]) {
|
||||
name: itm._sName,
|
||||
images: img
|
||||
? img.map((i) => {
|
||||
return i._sBaseUrl + '/' + i._sFile220
|
||||
})
|
||||
return i._sBaseUrl + '/' + i._sFile220
|
||||
})
|
||||
: [],
|
||||
dateadded: itm._tsDateAdded,
|
||||
submitter: {
|
||||
|
||||
Reference in New Issue
Block a user