Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance load on home screen #94

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions public/home/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export { default as atmSvg } from './alternative.svg'
export { default as cCdaSvg } from './c-cda.svg'
export { default as cpoeSvg } from './cpoe.svg'
export { default as cqmtsvg } from './CQMT.svg'
export { default as eRxSvg } from './erx.svg'
export { default as phrSvg } from './phr.svg'
export { default as directSvg } from './direct.svg'
export { default as hl7Svg } from './hl7.svg'
export { default as igSvg } from './ig.svg'
export { default as iheSvg } from './ihe.svg'
export { default as infernoSvg } from './inferno.svg'
export { default as infernoValidatorSvg } from './InfernoValidator.svg'
export { default as lanternSvg } from './lantern.svg'
export { default as referenceDataSvg } from './reference-data.svg'
23 changes: 11 additions & 12 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<html lang="en">
<head>
<Script async strategy="afterInteractive" src="https://www.googletagmanager.com/gtag/js?id=G-ZSC2EVZSVD" />
<Script
Copy link
Contributor

@drbgfc drbgfc Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattystank Since this is not a dynamic script, and we trust the source (Google), we can 'safely' use dangerouslySetInnerHTML, but, sanitization would be best practice. Can you add a ticket to the backlog to sanitize the response?

async
id="google-analytics"
strategy="afterInteractive"
src="https://www.googletagmanager.com/gtag/js?id= G-ZSC2EVZSVD"
></Script>
<Script strategy="beforeInteractive" id="google-analytics">
{`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ZSC2EVZSVD');
`}
</Script>
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ZSC2EVZSVD');
`,
}}
/>
</head>
<body>
<ThemeProvider theme={lightTheme}>
Expand All @@ -58,9 +59,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<Box role="main" sx={pageContainer}>
{children}
<Box sx={footer}>
{/* Global Ankle */}
<Ankle />
{/* Global Footer */}
<Footer />
</Box>
</Box>
Expand Down
Loading