Merge remote-tracking branch 'origin/main' into dev
This commit is contained in:
commit
32a3aee50d
|
|
@ -13,6 +13,7 @@ import { SiteHeader } from "~/components/site/SiteHeader"
|
|||
import { FABContainer } from "~/components/ui/FAB"
|
||||
import { SITE_URL } from "~/lib/env"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { isInRN } from "~/lib/is-in-rn"
|
||||
import { isOnlyContent, searchParser } from "~/lib/is-only-content"
|
||||
import getQueryClient from "~/lib/query-client"
|
||||
import { ExpandedNote } from "~/lib/types"
|
||||
|
|
@ -93,13 +94,14 @@ export default async function SiteLayout({
|
|||
}) {
|
||||
const queryClient = getQueryClient()
|
||||
|
||||
const { inRN } = isInRN()
|
||||
const search = searchParser()
|
||||
// https://github.com/vercel/next.js/issues/46618#issuecomment-1450416633
|
||||
// Issue: The type will not be updated when the page is redirected.
|
||||
let pathname = headers().get("x-xlog-pathname")
|
||||
const onlyContent = isOnlyContent()
|
||||
|
||||
if (pathname && /^(\/site(?!\/.*\/preview\/).*)/.test(pathname)) {
|
||||
if (!inRN && pathname && /^(\/site(?!\/.*\/preview\/).*)/.test(pathname)) {
|
||||
const targetPath = `${getSiteLink({
|
||||
subdomain: params.site,
|
||||
})}/${pathname.replace(/\/site\/(.*)\//, "")}`
|
||||
|
|
|
|||
Loading…
Reference in New Issue