feat: hide navigation and search in post modal

This commit is contained in:
DIYgod
2023-06-29 22:21:12 +01:00
parent 9408c38334
commit a0ea3c20e8
6 changed files with 51 additions and 25 deletions
+5 -1
View File
@@ -35,7 +35,11 @@ export const UniLink = ({
const isExternal =
href && (/^https?:\/\//.test(href) || href.startsWith("/feed"))
if (isExternal) {
const isInModal =
typeof window !== "undefined" &&
window.location.pathname.startsWith("/post/")
if (isExternal || isInModal) {
return (
<a
{...props}