You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm loading the state from the server to know if a mission is ongoing or not. However, when I can't reach the server, I want to show a screen which says the server can't be reached. It's the NotLoadedStatePage component:
const NotLoadedStatePage = () => {
console.log("NotLoadedStatePage");
return (
<div className="flex flex-col h-full items-center justify-between m-5">
<PageMainHeader title={websiteText.serverError} />
<div className="text-2xl font-semibold text-primary">
Couldn't fetch mission state from server, please check the server's
status or try again later.
</div>
<SignatureText />
</div>
);
};
For some reason though, when navigating to this page with the server turned off, it instead redirects me to the basic default notFoundComponent page, and I get the following message in my console:
Warning: A notFoundError was encountered on the route with ID "__root__", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<div>Not Found<div>)
How can I fix this, and render the correct component?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following route setup for the main page of my website:
I'm loading the state from the server to know if a mission is ongoing or not. However, when I can't reach the server, I want to show a screen which says the server can't be reached. It's the NotLoadedStatePage component:
For some reason though, when navigating to this page with the server turned off, it instead redirects me to the basic default notFoundComponent page, and I get the following message in my console:
How can I fix this, and render the correct component?
Beta Was this translation helpful? Give feedback.
All reactions