Skip to content

Commit b1d430c

Browse files
committed
refactor: revert useId changes in filter components
1 parent 10b0a61 commit b1d430c

File tree

8 files changed

+16
-24
lines changed

8 files changed

+16
-24
lines changed

src/components/filters/ReasonFilter.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FC, useId } from 'react';
1+
import type { FC } from 'react';
22

33
import { NoteIcon } from '@primer/octicons-react';
44
import { Text } from '@primer/react';
@@ -7,14 +7,12 @@ import { reasonFilter } from '../../utils/notifications/filters';
77
import { FilterSection } from './FilterSection';
88

99
export const ReasonFilter: FC = () => {
10-
const id = useId();
11-
1210
return (
1311
<FilterSection
1412
filter={reasonFilter}
1513
filterSetting="filterReasons"
1614
icon={NoteIcon}
17-
id={id}
15+
id="filter-reasons"
1816
title="Reason"
1917
tooltip={<Text>Filter notifications by reason.</Text>}
2018
/>

src/components/filters/StateFilter.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FC, useId } from 'react';
1+
import type { FC } from 'react';
22

33
import { IssueOpenedIcon } from '@primer/octicons-react';
44
import { Text } from '@primer/react';
@@ -7,14 +7,12 @@ import { stateFilter } from '../../utils/notifications/filters';
77
import { FilterSection } from './FilterSection';
88

99
export const StateFilter: FC = () => {
10-
const id = useId();
11-
1210
return (
1311
<FilterSection
1412
filter={stateFilter}
1513
filterSetting="filterStates"
1614
icon={IssueOpenedIcon}
17-
id={id}
15+
id="filter-state"
1816
title="State"
1917
tooltip={<Text>Filter notifications by state.</Text>}
2018
/>

src/components/filters/SubjectTypeFilter.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FC, useId } from 'react';
1+
import type { FC } from 'react';
22

33
import { BellIcon } from '@primer/octicons-react';
44
import { Text } from '@primer/react';
@@ -7,14 +7,12 @@ import { subjectTypeFilter } from '../../utils/notifications/filters';
77
import { FilterSection } from './FilterSection';
88

99
export const SubjectTypeFilter: FC = () => {
10-
const id = useId();
11-
1210
return (
1311
<FilterSection
1412
filter={subjectTypeFilter}
1513
filterSetting="filterSubjectTypes"
1614
icon={BellIcon}
17-
id={id}
15+
id="filter-subject-type"
1816
title="Type"
1917
tooltip={<Text>Filter notifications by type.</Text>}
2018
/>

src/components/filters/UserTypeFilter.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FC, useId } from 'react';
1+
import type { FC } from 'react';
22

33
import {
44
DependabotIcon,
@@ -13,14 +13,12 @@ import { userTypeFilter } from '../../utils/notifications/filters';
1313
import { FilterSection } from './FilterSection';
1414

1515
export const UserTypeFilter: FC = () => {
16-
const id = useId();
17-
1816
return (
1917
<FilterSection
2018
filter={userTypeFilter}
2119
filterSetting="filterUserTypes"
2220
icon={FeedPersonIcon}
23-
id={id}
21+
id="filter-user-types"
2422
layout="horizontal"
2523
title="User Type"
2624
tooltip={

src/components/filters/__snapshots__/ReasonFilter.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/filters/__snapshots__/StateFilter.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/filters/__snapshots__/SubjectTypeFilter.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/filters/__snapshots__/UserTypeFilter.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)