Skip to content

Commit d960502

Browse files
committed
refactor: avoid lint errors by renaming prop
Signed-off-by: Adam Setch <[email protected]>
1 parent fd8785f commit d960502

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/renderer/components/layout/Page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Page } from './Page';
44

55
describe('renderer/components/layout/Page.tsx', () => {
66
it('should render itself & its children', () => {
7-
const tree = render(<Page id="test">Test</Page>);
7+
const tree = render(<Page testId="test">Test</Page>);
88

99
expect(tree).toMatchSnapshot();
1010
});

src/renderer/components/layout/Page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import { Box } from '@primer/react';
44

55
interface IPage {
66
children: ReactNode;
7-
id: string;
7+
testId?: string;
88
}
99

1010
/**
1111
* Page component represents a single page view.
1212
* It creates a column layout for header, content, and footer.
1313
* The height is 100% to fill the parent container.
1414
*/
15-
export const Page: FC<IPage> = ({ children, id }) => {
15+
export const Page: FC<IPage> = ({ children, testId }) => {
1616
return (
17-
<Box className="flex flex-col h-screen" data-testid={id}>
17+
<Box className="flex flex-col h-screen" data-testid={testId}>
1818
{children}
1919
</Box>
2020
);

src/renderer/routes/Accounts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const AccountsRoute: FC = () => {
110110
}, []);
111111

112112
return (
113-
<Page id="accounts">
113+
<Page testId="accounts">
114114
<Header icon={PersonIcon}>Accounts</Header>
115115

116116
<Contents>

src/renderer/routes/Filters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const FiltersRoute: FC = () => {
1919
const { clearFilters } = useContext(AppContext);
2020

2121
return (
22-
<Page id="filters">
22+
<Page testId="filters">
2323
<Header fetchOnBack icon={FilterIcon}>
2424
Filters
2525
</Header>

src/renderer/routes/LoginWithOAuthApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const LoginWithOAuthAppRoute: FC = () => {
133133
);
134134

135135
return (
136-
<Page id="Login With OAuth App">
136+
<Page testId="Login With OAuth App">
137137
<Header icon={PersonIcon}>Login with OAuth App</Header>
138138

139139
<Contents>

src/renderer/routes/LoginWithPersonalAccessToken.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const LoginWithPersonalAccessTokenRoute: FC = () => {
125125
);
126126

127127
return (
128-
<Page id="Login With Personal Access Token">
128+
<Page testId="Login With Personal Access Token">
129129
<Header icon={KeyIcon}>Login with Personal Access Token</Header>
130130

131131
<Contents>

src/renderer/routes/Notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const NotificationsRoute: FC = () => {
3737
}
3838

3939
return (
40-
<Page id="notifications">
40+
<Page testId="notifications">
4141
<Contents paddingHorizontal={false}>
4242
{notifications.map((accountNotifications) => (
4343
<AccountNotifications

src/renderer/routes/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { SystemSettings } from '../components/settings/SystemSettings';
1414

1515
export const SettingsRoute: FC = () => {
1616
return (
17-
<Page id="settings">
17+
<Page testId="settings">
1818
<Header fetchOnBack icon={GearIcon}>
1919
Settings
2020
</Header>

0 commit comments

Comments
 (0)