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