Skip to content

Commit

Permalink
hot fix(frontend): improved 404 screen conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Dec 16, 2024
1 parent bebc810 commit 27b742c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agenta-web/src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type LayoutProps = {
const App: React.FC<LayoutProps> = ({children}) => {
const {user} = useProfileData()
const {appTheme} = useAppTheme()
const {currentApp} = useAppsData()
const {currentApp, isLoading, error} = useAppsData()
const [footerRef, {height: footerHeight}] = useElementSize()
const {project, projects} = useProjectData()
const classes = useStyles({themeMode: appTheme, footerHeight} as StyleProps)
Expand Down Expand Up @@ -207,7 +207,7 @@ const App: React.FC<LayoutProps> = ({children}) => {
// wait unitl we have the app id, if its an app route
if (isAppRoute && !appId) return null

if (appId && !currentApp)
if (appId && !currentApp && !isLoading && !error)
return (
<div className={classes.notFoundContainer}>
<Typography.Text>404 - Page Not Found</Typography.Text>
Expand Down

0 comments on commit 27b742c

Please sign in to comment.