refactor: render TrackingSDK as first child to pages
This helps with debugging and profiling. Also tracking isn't tied to the rendering of the UI. So nitpicking could also justify this change :)
This commit is contained in:
@@ -20,15 +20,19 @@ export default async function MyPages({
|
||||
}
|
||||
|
||||
const { tracking, accountPage } = accountPageRes
|
||||
|
||||
return (
|
||||
<main className={styles.blocks}>
|
||||
<Title>{accountPage.heading}</Title>
|
||||
{accountPage.content.length ? (
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
) : (
|
||||
<p>{formatMessage({ id: "No content published" })}</p>
|
||||
)}
|
||||
<>
|
||||
<main className={styles.blocks}>
|
||||
<Title>{accountPage.heading}</Title>
|
||||
{accountPage.content.length ? (
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
) : (
|
||||
<p>{formatMessage({ id: "No content published" })}</p>
|
||||
)}
|
||||
</main>
|
||||
|
||||
<TrackingSDK pageData={tracking} />
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user