fix: fetch mods withoud limit filter on landing page and apply limit once retrived
All checks were successful
Release to Staging / build_and_release (push) Successful in 45s
All checks were successful
Release to Staging / build_and_release (push) Successful in 45s
This commit is contained in:
parent
4b51fa55f5
commit
03f9269eb6
@ -249,10 +249,12 @@ const DisplayLatestMods = () => {
|
||||
const [latestMods, setLatestMods] = useState<ModDetails[]>([])
|
||||
|
||||
useDidMount(() => {
|
||||
fetchMods({ source: window.location.host, limit: 4 })
|
||||
fetchMods({ source: window.location.host })
|
||||
.then((res) => {
|
||||
res.sort((a, b) => b.published_at - a.published_at)
|
||||
setLatestMods(res)
|
||||
const mods = res
|
||||
.sort((a, b) => b.published_at - a.published_at)
|
||||
.slice(0, 4)
|
||||
setLatestMods(mods)
|
||||
})
|
||||
.finally(() => {
|
||||
setIsFetchingLatestMods(false)
|
||||
|
Loading…
Reference in New Issue
Block a user