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
2 changed files with 20 additions and 5 deletions
Showing only changes of commit e15307be3b - Show all commits

View File

@ -1,4 +1,4 @@
import { Link, useRouteError } from 'react-router-dom'
import { Link, useLocation, useRouteError } from 'react-router-dom'
import { appRoutes } from 'routes'
interface NotFoundPageProps {
@ -12,6 +12,8 @@ export const NotFoundPage = ({
}: Partial<NotFoundPageProps>) => {
const error = useRouteError() as Partial<NotFoundPageProps>
const location = useLocation()
return (
<div className='InnerBodyMain'>
<div className='ContainerMain'>
@ -23,7 +25,19 @@ export const NotFoundPage = ({
<div>
<p>{error?.message || message}</p>
</div>
<div className='IBMSMAction'>
<div
className='IBMSMAction'
style={{
gap: '10px'
}}
>
<Link
to={location.pathname}
className='btn btnMain IBMSMActionBtn'
type='button'
>
Try again
</Link>
<Link
to={appRoutes.home}
className='btn btnMain IBMSMActionBtn'

View File

@ -20,7 +20,8 @@ import {
getLocalStorageItem,
getReportingSet,
log,
LogType
LogType,
timeout
} from 'utils'
export const modRouteLoader =
@ -84,8 +85,8 @@ export const modRouteLoader =
// Parallel fetch mod event, latest events, mute, nsfw, repost lists
const settled = await Promise.allSettled([
ndkContext.fetchEvent(modFilter),
ndkContext.fetchEvents(latestFilter),
Promise.race([ndkContext.fetchEvent(modFilter), timeout(2000)]),
Promise.race([ndkContext.fetchEvents(latestFilter), timeout(2000)]),
ndkContext.getMuteLists(loggedInUserPubkey), // Pass pubkey for logged-in users
getReportingSet(CurationSetIdentifiers.NSFW, ndkContext),
getReportingSet(CurationSetIdentifiers.Repost, ndkContext)