Skip to content

Commit b9046a2

Browse files
committed
🐛(frontend) meta title rerender issue
The meta title is not displayed when we come back to a page from the dynamic router. The code seems to compute to quickly so we need to add a delay to the meta title computation.
1 parent d249ed0 commit b9046a2

File tree

1 file changed

+3
-1
lines changed
  • src/frontend/apps/impress/src/pages/docs/[id]

1 file changed

+3
-1
lines changed

src/frontend/apps/impress/src/pages/docs/[id]/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const DocPage = ({ id }: DocProps) => {
3636

3737
useEffect(() => {
3838
if (doc?.title) {
39-
document.title = `${doc.title} - Docs`;
39+
setTimeout(() => {
40+
document.title = `${doc.title} - Docs`;
41+
}, 100);
4042
}
4143
}, [doc?.title]);
4244

0 commit comments

Comments
 (0)