Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions components/ui/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function TitleTag({ size, title }) {
id={id}
color="default"
weight="semi-bold"
size="3"
size="4"
mb="2"
>
{title}
Expand All @@ -49,8 +49,33 @@ function TitleTag({ size, title }) {
</Heading>
);
}
case "h4": {
return (
<Heading
as="h4"
id={id}
color="default"
weight="semi-bold"
size="2"
mb="2"
>
{title}
</Heading>
);
}
default:
return null;
return (
<Heading
as="h2"
id={id}
color="default"
weight="semi-bold"
size="4"
mb="2"
>
{title}
</Heading>
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated code between h2 case and default case

Low Severity

The h2 case and default case in TitleTag now have identical implementations - both render a Heading with as="h2" and size="4" with the same props. This duplication increases maintenance burden and risks inconsistent bug fixes if someone updates one case but forgets to update the other. The cases could be combined using a fallthrough pattern.

Additional Locations (1)

Fix in Cursor Fix in Web

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export async function fetchUserId(email: string): Promise<string> {
We'll break this function down step-by-step:

<Steps titleSize="h4">
<Step title="Get the `access_token` stored in Knock for the user's tenant">
<Step title="Get the access_token stored in Knock for the user's tenant">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't see this in the PR description so just making sure you intend to include this?

Since your users have already connected their Slack workspace to Knock, you can use the `knockClient.objects.getChannelData` method to get the `access_token` for the user's tenant. Tenants in Knock are stored in a system-reserved object collection called `$tenants`.

```javascript
Expand Down
Loading