fix: latest mods on landing. change: mods-inner url to mod #32

Merged
freakoverse merged 2 commits from staging into master 2024-09-03 10:32:21 +00:00
Showing only changes of commit 03f9269eb6 - Show all commits

View File

@ -249,10 +249,12 @@ const DisplayLatestMods = () => {
const [latestMods, setLatestMods] = useState<ModDetails[]>([]) const [latestMods, setLatestMods] = useState<ModDetails[]>([])
useDidMount(() => { useDidMount(() => {
fetchMods({ source: window.location.host, limit: 4 }) fetchMods({ source: window.location.host })
.then((res) => { .then((res) => {
res.sort((a, b) => b.published_at - a.published_at) const mods = res
setLatestMods(res) .sort((a, b) => b.published_at - a.published_at)
.slice(0, 4)
setLatestMods(mods)
}) })
.finally(() => { .finally(() => {
setIsFetchingLatestMods(false) setIsFetchingLatestMods(false)