We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8df4afc commit 214cb23Copy full SHA for 214cb23
1 file changed
website/src/renderer/_error.page.tsx
@@ -19,19 +19,21 @@ export const Page = () => {
19
20
const ClientPage = () => {
21
const location = useLocation()
22
+ const path = location.pathname.endsWith("/")
23
+ ? location.pathname.slice(0, -1)
24
+ : location.pathname
25
+
26
const [{ data, fetching }] = Dailp.usePageByPathQuery({
27
variables: {
- path: location.pathname.endsWith("/")
- ? location.pathname.slice(0, -1)
- : location.pathname,
28
+ path: path,
29
},
30
requestPolicy: "network-only",
31
})
32
33
if (fetching) {
34
return null
35
} else if (data && data.pageByPath) {
- return <DailpPageContents path={location.pathname} />
36
+ return <DailpPageContents path={path} />
37
} else {
38
return <NotFound />
39
}
0 commit comments