Skip to content

Commit

Permalink
fix: getting started button goes to correct platform page (#6302)
Browse files Browse the repository at this point in the history
* fix: getting started button goes to correct platform page

* removed unnecessary import

---------

Co-authored-by: katiegoines <[email protected]>
  • Loading branch information
katiegoines and katiegoines authored Nov 10, 2023
1 parent 104d738 commit 55aaef0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/components/GetStartedPopover/GetStartedPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const getStartedLinks = [
}
];

export const GetStartedPopover = () => {
export const GetStartedPopover = (platform) => {
const [expanded, setExpanded] = useState<boolean>(false);

const triggerRef = useRef<HTMLButtonElement>(null);
Expand Down Expand Up @@ -135,14 +135,16 @@ export const GetStartedPopover = () => {
}
};

platform = platform.platform;

return (
<Flex className="split-button">
<InternalLinkButton
size="large"
className="split-button__start"
href={{
pathname: '/[platform]/start/getting-started/introduction/',
query: { platform: DEFAULT_PLATFORM }
query: { platform: platform }
}}
>
Get started
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[platform]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const PlatformOverview = ({ platform }) => {
<IconChevron className="icon-rotate-270" fontSize=".875em" />
</InternalLinkButton>

<GetStartedPopover />
<GetStartedPopover platform={platform} />
</Flex>
</Flex>
<Flex direction="column">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function Page() {
fontSize=".875em"
/>
</InternalLinkButton>
<GetStartedPopover />
<GetStartedPopover platform={DEFAULT_PLATFORM} />
</Flex>
</Flex>
<Flex direction="column">
Expand Down

0 comments on commit 55aaef0

Please sign in to comment.