fix: latest mods on landing. change: mods-inner url to mod #32
@ -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