From 5ddd7e3ec91d75a29395afc1c0b9defb283ec802 Mon Sep 17 00:00:00 2001 From: Erik Hanchett Date: Tue, 10 Dec 2024 14:50:37 -0800 Subject: [PATCH] Updated based on review --- src/components/Layout/Layout.tsx | 3 +- src/data/gen2Banner-urls.ts | 4 -- src/directory/directory.d.ts | 2 +- yarn.lock | 76 +++++++------------------------- 4 files changed, 18 insertions(+), 67 deletions(-) delete mode 100644 src/data/gen2Banner-urls.ts diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index 8d3bd84b08f..018fc322e1d 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -21,7 +21,6 @@ import { PLATFORM_DISPLAY_NAMES, Platform } from '@/data/platforms'; -import { GEN2BANNER_URLS } from '@/data/gen2Banner-urls'; import { SpaceShip } from '@/components/SpaceShip'; import { LEFT_NAV_LINKS, RIGHT_NAV_LINKS } from '@/utils/globalnav'; import { LayoutProvider, LayoutHeader } from '@/components/Layout'; @@ -73,7 +72,7 @@ export const Layout = ({ const basePath = 'docs.amplify.aws'; const metaUrl = url ? url : basePath + asPathWithNoHash; const pathname = router.pathname; - const shouldShowGen2Banner = GEN2BANNER_URLS.includes(asPathWithNoHash); + const shouldShowGen2Banner = asPathWithNoHash === '/'; const isGen1 = asPathWithNoHash.split('/')[1] === 'gen1'; const isContributor = asPathWithNoHash.split('/')[1] === 'contribute'; const currentGlobalNavMenuItem = isContributor ? 'Contribute' : 'Docs'; diff --git a/src/data/gen2Banner-urls.ts b/src/data/gen2Banner-urls.ts deleted file mode 100644 index 5a9c1707021..00000000000 --- a/src/data/gen2Banner-urls.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * List of paths that the gen2 should display on - */ -export const GEN2BANNER_URLS = ['/']; diff --git a/src/directory/directory.d.ts b/src/directory/directory.d.ts index 763d1f8a8a2..ad0fd85e291 100644 --- a/src/directory/directory.d.ts +++ b/src/directory/directory.d.ts @@ -59,7 +59,7 @@ export type PageNode = { hideChildrenOnBase?: boolean; /** - * This flag indicates that the item is new and will display a pill + * This flag indicates that the item is new and will display a "new" badge */ isNew?: boolean; }; diff --git a/yarn.lock b/yarn.lock index a97e5c13c88..25fb27bfcfc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -350,44 +350,24 @@ fast-xml-parser "^4.4.1" tslib "^2.5.0" -"@aws-amplify/ui-react-ai@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-ai/-/ui-react-ai-1.0.0.tgz#db6dede6b42685f9c03293374a1aaf195de7f02f" - integrity sha512-Y+ezPjjdUajEjN+naWhaBn7TQ4nVEtB0EylGwI8YrLKHFQVJaEGBWvvw9mfiUl3krWv+utP+EhagTM8Zk9cMBg== - dependencies: - "@aws-amplify/ui" "^6.6.6" - "@aws-amplify/ui-react" "^6.6.0" - "@aws-amplify/ui-react-core" "^3.0.30" - -"@aws-amplify/ui-react-core@3.0.30", "@aws-amplify/ui-react-core@^3.0.30": - version "3.0.30" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.0.30.tgz#e86346d5293bfa7f22aae9832fc0bef94ea64a83" - integrity sha512-3AaUSC1Mg+yr7TqHfp34QpP6ICjQl9wUR+x7KxsETc7m5tCv4ANGXOD7qaADCi3CEw2IChBFuVu4NFKsGJbjqQ== +"@aws-amplify/ui-react-core@3.0.22": + version "3.0.22" + resolved "https://registry.npmjs.org/@aws-amplify/ui-react-core/-/ui-react-core-3.0.22.tgz" + integrity sha512-uL5jspqvTZhpqH1inPV3ifvrzIVgIIriXPgjz4BaceDm+1X03Hc3tfq5TiUKW8PdpuWF6riXXBP3MEFsk29OGw== dependencies: - "@aws-amplify/ui" "6.6.6" + "@aws-amplify/ui" "6.4.1" "@xstate/react" "^3.2.2" lodash "4.17.21" react-hook-form "^7.43.5" xstate "^4.33.6" -"@aws-amplify/ui-react-core@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react-core/-/ui-react-core-3.1.0.tgz#236ecf10194a27dc57fc983c679ab1de19b8a00d" - integrity sha512-Nime3qjJRQyfRDDA4bnAaFVzRfEBddZFP8NhVIb13z7Uw0XoPQzX+dXwuRW+Bjt2FJnlIUHh7Cfkt0m4PedRHQ== +"@aws-amplify/ui-react@^6.3.1": + version "6.3.1" + resolved "https://registry.npmjs.org/@aws-amplify/ui-react/-/ui-react-6.3.1.tgz" + integrity sha512-n/wTjMYYuAhpgpuQ4o+9+IgvNsdjGqbfaA4bAXE7b1apIOfM8HTaO2zant85x+geDl7rbaa1y/z62T4H9AksMQ== dependencies: - "@aws-amplify/ui" "6.7.0" - "@xstate/react" "^3.2.2" - lodash "4.17.21" - react-hook-form "^7.43.5" - xstate "^4.33.6" - -"@aws-amplify/ui-react@^6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.6.0.tgz#1d10f435286fcac5e07330e318a0e30c0c84de94" - integrity sha512-BHth+/CBZ8XE0IBpq+L/7mWbvGRIQxjtOmW50593hW7PvtaSXXDzPHZXRQ5nRhWs1anhxNWDiv4BKuiey6YpOw== - dependencies: - "@aws-amplify/ui" "6.6.6" - "@aws-amplify/ui-react-core" "3.0.30" + "@aws-amplify/ui" "6.4.1" + "@aws-amplify/ui-react-core" "3.0.22" "@radix-ui/react-direction" "1.0.0" "@radix-ui/react-dropdown-menu" "1.0.0" "@radix-ui/react-slider" "1.0.0" @@ -396,34 +376,10 @@ qrcode "1.5.0" tslib "^2.5.2" -"@aws-amplify/ui-react@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui-react/-/ui-react-6.7.0.tgz#a3fc28980feee01f319448c360307a5ccc65c7f3" - integrity sha512-3H97gz43+iaVNPqkQIiFj4Ko7zJLyMGtZScfNyt6PK4Ntuit5ZP6hc+Z7BtNsNEkfnAiGL1BiNOuD1IBfsnifw== - dependencies: - "@aws-amplify/ui" "6.7.0" - "@aws-amplify/ui-react-core" "3.1.0" - "@radix-ui/react-direction" "1.0.0" - "@radix-ui/react-dropdown-menu" "1.0.0" - "@radix-ui/react-slider" "1.0.0" - "@xstate/react" "^3.2.2" - lodash "4.17.21" - qrcode "1.5.0" - tslib "^2.5.2" - -"@aws-amplify/ui@6.6.6", "@aws-amplify/ui@^6.6.6": - version "6.6.6" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.6.6.tgz#adf39ea025ed2f35e46bb01323f8d73142b41f59" - integrity sha512-4fBMO5+saXaAgBwhYbQIgudVcK1B9oHuG3WizMpImcYUbB5aL4B6NhFtmSz3DBBqAeqrZHUuUV7gWibU5JxAGQ== - dependencies: - csstype "^3.1.1" - lodash "4.17.21" - tslib "^2.5.2" - -"@aws-amplify/ui@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/ui/-/ui-6.7.0.tgz#f31da1515a25c2fac3d9e17c9638e619a988baf8" - integrity sha512-6hByYfFBQRjsFMoVGdCWMSdo7rwMgz6rxxdWV0xuHb4j3tsPEI9ZhRXG0Z1ivtQFAM3Uaz0D3hcg1kp6QFdCFg== +"@aws-amplify/ui@6.4.1": + version "6.4.1" + resolved "https://registry.npmjs.org/@aws-amplify/ui/-/ui-6.4.1.tgz" + integrity sha512-0rGGJjnd60gZNhjqDepk3VpCpzyJDE2+xevVg0iqM8APKpyQ9XRWisNLIvglQy7p/3CauXdw8U0NZVcu29Yhrw== dependencies: csstype "^3.1.1" lodash "4.17.21" @@ -4618,7 +4574,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^6.0.0, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: +cross-spawn@^6.0.0, "cross-spawn@^6.0.6 || ^7.0.5", cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==