Skip to content

Commit

Permalink
Enhance load on home screen (#94)
Browse files Browse the repository at this point in the history
* feat: move images tdifferent file

* feat: enhance speed with lazy loading & skeletons

* fix: script

* fix: remove useMemo
  • Loading branch information
mattystank committed Jul 26, 2024
1 parent 002e0d9 commit 0de0648
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 284 deletions.
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
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

0 comments on commit 0de0648

Please sign in to comment.