feat: add the feature to zap admin/app account #4
@ -1 +1,2 @@
|
||||
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 { ModDetails, MuteLists } from '../types'
|
||||
import { fetchMods } from '../utils'
|
||||
import { MOD_FILTER_LIMIT } from '../constants'
|
||||
|
||||
enum SortBy {
|
||||
Latest = 'Latest',
|
||||
@ -190,7 +191,7 @@ export const ModsPage = () => {
|
||||
|
||||
<Pagination
|
||||
page={page}
|
||||
disabledNext={mods.length < 20}
|
||||
disabledNext={mods.length < MOD_FILTER_LIMIT}
|
||||
handlePrev={handlePrev}
|
||||
handleNext={handleNext}
|
||||
/>
|
||||
|
@ -4,7 +4,7 @@ import { ModFormState, ModDetails } from '../types'
|
||||
import { RelayController } from '../controllers'
|
||||
import { log, LogType } from './utils'
|
||||
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.
|
||||
@ -151,7 +151,7 @@ export const fetchMods = async (
|
||||
// Define the filter criteria for fetching mods
|
||||
const filter: Filter = {
|
||||
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],
|
||||
until, // Optional filter to fetch events until this timestamp
|
||||
since // Optional filter to fetch events from this timestamp
|
||||
|
Loading…
Reference in New Issue
Block a user