try again button, user blog tab load, no game text #181

Merged
freakoverse merged 14 commits from staging into master 2025-01-03 11:29:54 +00:00
Showing only changes of commit 037b81c49e - Show all commits

View File

@ -39,6 +39,7 @@ import {
scrollIntoView scrollIntoView
} from 'utils' } from 'utils'
import { useCuratedSet } from 'hooks/useCuratedSet' import { useCuratedSet } from 'hooks/useCuratedSet'
import dedup from 'utils/nostr'
enum SearchKindEnum { enum SearchKindEnum {
Mods = 'Mods', Mods = 'Mods',
@ -508,6 +509,11 @@ const GamesResult = ({ searchTerm }: GamesResultProps) => {
return ( return (
<> <>
{searchTerm !== '' && filteredGames.length === 0 && (
<div className='IBMSecMain IBMSMListWrapper'>
Game not found. Send us a message where you can reach us to add it
</div>
)}
<div className='IBMSecMain IBMSMListWrapper'> <div className='IBMSecMain IBMSMListWrapper'>
<div className='IBMSMList IBMSMListFeaturedAlt'> <div className='IBMSMList IBMSMListFeaturedAlt'>
{filteredGames {filteredGames
@ -521,20 +527,14 @@ const GamesResult = ({ searchTerm }: GamesResultProps) => {
))} ))}
</div> </div>
</div> </div>
<Pagination {searchTerm !== '' && filteredGames.length > MAX_GAMES_PER_PAGE && (
page={page} <Pagination
disabledNext={filteredGames.length <= page * MAX_GAMES_PER_PAGE} page={page}
handlePrev={handlePrev} disabledNext={filteredGames.length <= page * MAX_GAMES_PER_PAGE}
handleNext={handleNext} handlePrev={handlePrev}
/> handleNext={handleNext}
/>
)}
</> </>
) )
} }
function dedup(event1: NDKEvent, event2: NDKEvent) {
// return the newest of the two
if (event1.created_at! > event2.created_at!) {
return event1
}
return event2
}