From 4bc87d2ce1b31e7c311f73a17a347d1472bea8c9 Mon Sep 17 00:00:00 2001 From: Josh Nygaard Date: Tue, 26 Dec 2023 14:21:39 -0500 Subject: [PATCH] run npx @next/codemod next-image-experimental . --- akamai-loader.js | 4 + components/FooterUSWDS/FooterUSWDS.js | 7 +- components/products/building-blocks-links.js | 44 +++++- .../products/software-development-kit-info.js | 70 +++++++-- next.config.js | 4 +- pages/about.js | 7 - pages/engage-with-us.js | 134 +++++++++--------- pages/index.js | 33 ++--- pages/products.js | 19 +-- 9 files changed, 193 insertions(+), 129 deletions(-) create mode 100644 akamai-loader.js diff --git a/akamai-loader.js b/akamai-loader.js new file mode 100644 index 0000000..132f843 --- /dev/null +++ b/akamai-loader.js @@ -0,0 +1,4 @@ +const normalizeSrc = (src) => src[0] === '/' ? src.slice(1) : src +export default function akamaiLoader({ src, width, quality }) { +return '/' + normalizeSrc(src) + '?imwidth=' + width +} \ No newline at end of file diff --git a/components/FooterUSWDS/FooterUSWDS.js b/components/FooterUSWDS/FooterUSWDS.js index 572e3c8..baf053d 100644 --- a/components/FooterUSWDS/FooterUSWDS.js +++ b/components/FooterUSWDS/FooterUSWDS.js @@ -1,5 +1,5 @@ import { Address, FooterNav, Logo, Footer } from "@trussworks/react-uswds"; -import Image from "next/legacy/image"; +import Image from "next/image"; import Link from "next/link"; import cdcLogo from '../../public/icons/cdc.svg' import styles from '../../styles/Home.module.scss'; @@ -78,7 +78,10 @@ export default function FooterUSWDS() { className="usa-footer__logo-img text-base-lightest desktop:grid-col-auto grid-col-auto" alt='CDC Logo' src={cdcLogo} - /> + style={{ + maxWidth: "100%", + height: "auto" + }} />
Centers for Disease Control and Prevention
diff --git a/components/products/building-blocks-links.js b/components/products/building-blocks-links.js index a9b6150..1aaf258 100644 --- a/components/products/building-blocks-links.js +++ b/components/products/building-blocks-links.js @@ -1,6 +1,6 @@ import styles from "../../styles/Home.module.scss"; import {Link} from "@trussworks/react-uswds"; -import Image from "next/legacy/image"; +import Image from "next/image"; import cloudIcon from "../../public/icons/cloud.svg"; import fhirConverter from "../../public/icons/fhirConverter.svg"; import locationIcon from "../../public/icons/location.svg"; @@ -43,7 +43,13 @@ export const BuildingBlocksInfo = () => {
- +
{
- +
{
- +
{
- +
{
- +
{
- ) + ); } diff --git a/components/products/software-development-kit-info.js b/components/products/software-development-kit-info.js index 4b3a755..e181b92 100644 --- a/components/products/software-development-kit-info.js +++ b/components/products/software-development-kit-info.js @@ -1,6 +1,6 @@ import styles from "../../styles/Home.module.scss"; import {Link} from "@trussworks/react-uswds"; -import Image from "next/legacy/image"; +import Image from "next/image"; import cloudIcon from "../../public/icons/cloud.svg"; import fhirConverter from "../../public/icons/fhirConverter.svg"; import locationIcon from "../../public/icons/location.svg"; @@ -12,7 +12,7 @@ import transport from "../../public/icons/transport.svg"; export const SoftwareDevelopmentKitInfo = () => { - return( + return (
@@ -44,7 +44,13 @@ export const SoftwareDevelopmentKitInfo = () => {
- +
{
- +
{
- +
{
- +
{
- +
{
- +
{
- +
{
- +
{
- ) + ); } diff --git a/next.config.js b/next.config.js index 272c066..42068cc 100644 --- a/next.config.js +++ b/next.config.js @@ -5,8 +5,8 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, images: { - loader: 'akamai', - path: '/' + loader: "custom", + loaderFile: "./akamai-loader.js" }, basePath: "/dibbs-site", assetPrefix: '/dibbs-site', diff --git a/pages/about.js b/pages/about.js index c915c4f..9025523 100644 --- a/pages/about.js +++ b/pages/about.js @@ -1,12 +1,5 @@ import {Button} from '@trussworks/react-uswds'; -import Image from "next/legacy/image"; import styles from '../styles/Home.module.scss'; -import buildingBlockImage from '../public/building-block-1.svg'; -import mobileBuildingBlockImage from '../public/mobile/mobile-building-block.svg'; -import locationIcon from '../public/icons/location.svg'; -import linkIcon from '../public/icons/link.svg'; -import codeIcon from '../public/icons/code.svg'; -import organizationIcon from '../public/icons/organization.svg'; import {Link} from '@trussworks/react-uswds'; import Head from 'next/head'; diff --git a/pages/engage-with-us.js b/pages/engage-with-us.js index 5e13bcf..3cd13b9 100644 --- a/pages/engage-with-us.js +++ b/pages/engage-with-us.js @@ -5,88 +5,84 @@ import getInvolved2 from '../public/get-involved-2.svg'; import mobileGetInvolved1 from '../public/mobile/get-involved-1.svg'; import mobileGetInvolved2 from '../public/mobile/get-involved-2.svg'; -import Image from "next/legacy/image"; +import Image from "next/image"; import Head from 'next/head'; export default function GetInvolved() { - return ( - <> - - How to engage with us - Data Integration Building Blocks - -
-
-
-

- How to engage with us -

-
- Below we've outlined how jurisdictions can start - working with the DIBBs team. -
+ return <> + + How to engage with us - Data Integration Building Blocks + +
+
+
+

+ How to engage with us +

+
+ Below we've outlined how jurisdictions can start + working with the DIBBs team. +
+
+ +
+
+
+
-
-
-
+
+
-
- -
-
- -
-

- Try our products -

-
- If your jurisdiction is interested in using our products to solve your public health data challenges, please reach out to our team. We’d love to better understand your data needs and find ways to plug in. -
- + className="text-center margin-bottom-105 desktop:display-none"> +
-
-
-
- -
-
- -
-

- Talk to us -

-
- Want to learn more? Our team is available to talk about how we can help you improve your public health data processing workflows. -
+ className="text-center margin-bottom-105 display-none desktop:display-block"> + +
+

+ Talk to us +

+
+ Want to learn more? Our team is available to talk about how we can help you improve your public health data processing workflows.
- - ); +
+ ; } diff --git a/pages/index.js b/pages/index.js index b6014a9..a501573 100644 --- a/pages/index.js +++ b/pages/index.js @@ -3,7 +3,7 @@ import '@trussworks/react-uswds/lib/uswds.css'; import '@trussworks/react-uswds/lib/index.css'; import { Button } from '@trussworks/react-uswds'; import Link from 'next/link'; -import Image from "next/legacy/image"; +import Image from "next/image"; import desktopHero1 from './../public/desktop-hero-1.svg'; import desktopHero2 from '../public/desktop-hero-2.svg'; import desktopHero3 from '../public/desktop-hero-3.svg'; @@ -26,7 +26,7 @@ export default function Home() {
- +
@@ -55,7 +55,7 @@ export default function Home() {
- +
@@ -63,14 +63,14 @@ export default function Home() {
- +
- +
@@ -123,10 +123,10 @@ export default function Home() {
- +
- +
@@ -134,10 +134,10 @@ export default function Home() {
- +
- +
@@ -151,18 +151,19 @@ export default function Home() { >
- +
- +
- +
- +
@@ -82,13 +77,7 @@ export default function ProductOffering() {
- +