chore: quick fix
This commit is contained in:
parent
7b9c95c863
commit
44d0100341
@ -1 +1,2 @@
|
|||||||
export const T_TAG_VALUE = 'GameMod'
|
export const T_TAG_VALUE = 'GameMod'
|
||||||
|
export const MOD_FILTER_LIMIT = 20
|
||||||
|
@ -19,6 +19,7 @@ import '../styles/search.css'
|
|||||||
import '../styles/styles.css'
|
import '../styles/styles.css'
|
||||||
import { ModDetails, MuteLists } from '../types'
|
import { ModDetails, MuteLists } from '../types'
|
||||||
import { fetchMods } from '../utils'
|
import { fetchMods } from '../utils'
|
||||||
|
import { MOD_FILTER_LIMIT } from '../constants'
|
||||||
|
|
||||||
enum SortBy {
|
enum SortBy {
|
||||||
Latest = 'Latest',
|
Latest = 'Latest',
|
||||||
@ -190,7 +191,7 @@ export const ModsPage = () => {
|
|||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
page={page}
|
page={page}
|
||||||
disabledNext={mods.length < 20}
|
disabledNext={mods.length < MOD_FILTER_LIMIT}
|
||||||
handlePrev={handlePrev}
|
handlePrev={handlePrev}
|
||||||
handleNext={handleNext}
|
handleNext={handleNext}
|
||||||
/>
|
/>
|
||||||
|
@ -4,7 +4,7 @@ import { ModFormState, ModDetails } from '../types'
|
|||||||
import { RelayController } from '../controllers'
|
import { RelayController } from '../controllers'
|
||||||
import { log, LogType } from './utils'
|
import { log, LogType } from './utils'
|
||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
import { T_TAG_VALUE } from '../constants'
|
import { MOD_FILTER_LIMIT, T_TAG_VALUE } from '../constants'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts and normalizes mod data from an event.
|
* Extracts and normalizes mod data from an event.
|
||||||
@ -151,7 +151,7 @@ export const fetchMods = async (
|
|||||||
// Define the filter criteria for fetching mods
|
// Define the filter criteria for fetching mods
|
||||||
const filter: Filter = {
|
const filter: Filter = {
|
||||||
kinds: [kinds.ClassifiedListing], // Specify the kind of events to fetch
|
kinds: [kinds.ClassifiedListing], // Specify the kind of events to fetch
|
||||||
limit: 20, // Limit the number of events fetched to 20
|
limit: MOD_FILTER_LIMIT, // Limit the number of events fetched to 20
|
||||||
'#t': [T_TAG_VALUE],
|
'#t': [T_TAG_VALUE],
|
||||||
until, // Optional filter to fetch events until this timestamp
|
until, // Optional filter to fetch events until this timestamp
|
||||||
since // Optional filter to fetch events from this timestamp
|
since // Optional filter to fetch events from this timestamp
|
||||||
|
Loading…
Reference in New Issue
Block a user