Fix: Resolve 404 error on public status page

This commit is contained in:
Tola Leng
2025-06-26 15:43:41 +07:00
parent c30bcf9e73
commit fd08a64a05
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ function App() {
<Routes> <Routes>
<Route path="/" element={<Index />} /> <Route path="/" element={<Index />} />
<Route path="/login" element={<Login />} /> <Route path="/login" element={<Login />} />
<Route path="/public/:pageId" element={<PublicStatusPage />} /> <Route path="/public/:slug" element={<PublicStatusPage />} />
{/* Protected Routes */} {/* Protected Routes */}
<Route path="/dashboard" element={ <Route path="/dashboard" element={
@@ -39,8 +39,8 @@ export const OperationalPageContent = () => {
if (page.custom_domain) { if (page.custom_domain) {
window.open(`https://${page.custom_domain}`, '_blank'); window.open(`https://${page.custom_domain}`, '_blank');
} else { } else {
// Navigate to the public status page route // Navigate to the public status page route using the correct format
window.open(`/status/${page.slug}`, '_blank'); window.open(`/public/${page.slug}`, '_blank');
} }
}; };