Skip to content

Commit 9b511f2

Browse files
authored
Merge branch 'next-release/main' into next-release/version-simple
2 parents aa2604d + 5ed303e commit 9b511f2

File tree

44 files changed

+2970
-2382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2970
-2382
lines changed

mdx-components.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Block, BlockSwitcher } from './src/components/BlockSwitcher';
99
import { Callout } from './src/components/Callout';
1010
import Fragments from './src/components/Fragments';
1111
import { MDXCode, MDXHeading, MDXLink } from './src/components/MDXComponents';
12-
import MigrationAlert from './src/components/MigrationAlert';
12+
import { MigrationAlert } from './src/components/MigrationAlert';
1313
import preToCodeBlock from './src/utils/pre-to-code-block';
1414
import { Overview } from './src/components/Overview';
1515
import ExternalLink from './src/components/ExternalLink';

src/components/GlobalNav/components/icons/AmplifyLogo.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ export function AmplifyLogo({ isGen2 }: AmplifyLogoProps) {
1111
width="20px"
1212
height="20px"
1313
viewBox={{ width: 24, height: 22 }}
14-
pathData="M20.6144 19L10.1205 1H13.5019L24 19H20.6144ZM7.80721 5.3588L15.4882 19H18.7952L9.45719 2.42859L7.80721 5.3588ZM4.89082 10.5419L0 19H13.8795L12.1271 15.9696H5.2705L8.70006 10.043L6.94038 7L4.89082 10.5419Z"
1514
color={isGen2 ? 'font.inverse' : 'brand.primary.60'}
15+
paths={[
16+
{
17+
d: 'M14.3128 20.0394C14.3651 20.1298 14.4618 20.1855 14.5664 20.1855H16.8444C17.0698 20.1855 17.2107 19.942 17.098 19.7472L8.82308 5.44278C8.71037 5.24795 8.4286 5.24795 8.31589 5.44278L7.09981 7.54494C7.09518 7.55294 7.09518 7.56281 7.09981 7.57081L7.10128 7.57334C7.1106 7.58946 7.09894 7.60961 7.08029 7.60961C7.07163 7.60961 7.06363 7.61422 7.0593 7.62171L0.0396396 19.7616C-0.0730193 19.9565 0.0678714 20.2 0.293265 20.2H10.9633C11.1887 20.2 11.3296 19.9564 11.2169 19.7616L10.1254 17.8749C10.0731 17.7845 9.97646 17.7288 9.87184 17.7288H4.4145C4.3018 17.7288 4.23135 17.607 4.28771 17.5096L8.4417 10.3288C8.49805 10.2314 8.63894 10.2314 8.6953 10.3288L14.3128 20.0394Z'
18+
},
19+
{
20+
d: 'M10.1282 2.30989C10.0759 2.40032 10.0759 2.51172 10.1282 2.60214L20.2155 20.0394C20.2678 20.1298 20.3645 20.1855 20.4691 20.1855H22.7412C22.9666 20.1855 23.1075 19.942 22.9948 19.7472L11.7715 0.346077C11.6588 0.151242 11.377 0.151243 11.2643 0.346077L10.1282 2.30989Z'
21+
}
22+
]}
1623
/>
1724
);
1825
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { useState } from 'react';
2+
import { Callout } from '../Callout';
3+
import Link from 'next/link';
4+
import { useCurrentPlatform } from '@/utils/useCurrentPlatform';
5+
import { Platform } from '@/data/platforms';
6+
7+
type MigrationAlert = {
8+
isLegacy: boolean;
9+
url: string;
10+
};
11+
12+
export function MigrationAlert({ isLegacy, url }: MigrationAlert) {
13+
const currentPlatform = useCurrentPlatform();
14+
15+
const alertText = isLegacy
16+
? 'You are currently viewing the legacy GraphQL Transformer documentation.'
17+
: 'You are currently viewing the new GraphQL transformer v2 docs';
18+
19+
const alertCTA = isLegacy
20+
? 'View latest documentation'
21+
: 'Looking for legacy docs?';
22+
23+
return (
24+
<Callout warning={true}>
25+
{alertText}{' '}
26+
<Link
27+
href={{
28+
pathname: url,
29+
query: { platform: currentPlatform }
30+
}}
31+
>
32+
{alertCTA}
33+
</Link>
34+
</Callout>
35+
);
36+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { MigrationAlert } from './MigrationAlert';

src/components/MigrationAlert/index.tsx

Lines changed: 0 additions & 164 deletions
This file was deleted.

src/components/Overview/Overview.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ export function Overview({ childPageNodes }: OverviewProps) {
2020
return (
2121
<Columns columns={2} size="small" className="overview">
2222
{childPageNodes
23-
.filter((node) => node?.platforms?.includes(currentPlatform))
23+
.filter((node) => {
24+
if (currentPlatform) {
25+
return node?.platforms?.includes(currentPlatform)
26+
} else {
27+
return true
28+
}
29+
})
2430
.map((node) => (
2531
<Link
2632
key={node.route}

0 commit comments

Comments
 (0)