= ({ children, justify }) => {
+export function Footer({ children, justify }: FooterProps) {
return (
@@ -19,4 +19,4 @@ export const Footer: FC = ({ children, justify }) => {
);
-};
+}
diff --git a/src/renderer/components/primitives/Header.tsx b/src/renderer/components/primitives/Header.tsx
index 05aa53dde..63eebba2b 100644
--- a/src/renderer/components/primitives/Header.tsx
+++ b/src/renderer/components/primitives/Header.tsx
@@ -1,4 +1,3 @@
-import type { FC } from 'react';
import { useNavigate } from 'react-router-dom';
import { ArrowLeftIcon, type Icon } from '@primer/octicons-react';
@@ -14,7 +13,7 @@ interface HeaderProps {
fetchOnBack?: boolean;
}
-export const Header: FC = (props: HeaderProps) => {
+export function Header(props: HeaderProps) {
const navigate = useNavigate();
const { refetchNotifications: fetchNotifications } = useNotifications();
@@ -42,4 +41,4 @@ export const Header: FC = (props: HeaderProps) => {
);
-};
+}
diff --git a/src/renderer/components/primitives/HoverButton.tsx b/src/renderer/components/primitives/HoverButton.tsx
index bbc3f82a6..7b4b491ab 100644
--- a/src/renderer/components/primitives/HoverButton.tsx
+++ b/src/renderer/components/primitives/HoverButton.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import type { Icon } from '@primer/octicons-react';
import { IconButton } from '@primer/react';
@@ -14,11 +12,7 @@ interface HoverButtonProps {
variant?: VariantType;
}
-export const HoverButton: FC = ({
- enabled = true,
- variant = 'invisible',
- ...props
-}: HoverButtonProps) => {
+export function HoverButton({ enabled = true, variant = 'invisible', ...props }: HoverButtonProps) {
return (
enabled && (
= ({
/>
)
);
-};
+}
diff --git a/src/renderer/components/primitives/HoverGroup.tsx b/src/renderer/components/primitives/HoverGroup.tsx
index 4f6461466..e06edad8c 100644
--- a/src/renderer/components/primitives/HoverGroup.tsx
+++ b/src/renderer/components/primitives/HoverGroup.tsx
@@ -1,4 +1,4 @@
-import type { FC, ReactNode } from 'react';
+import type { ReactNode } from 'react';
import { Stack } from '@primer/react';
@@ -28,11 +28,7 @@ interface HoverGroupProps {
* title line or the issue number, and the footer reserves its width so the
* pills wrap clear of the buttons.
*/
-export const HoverGroup: FC = ({
- bgColor,
- children,
- fullHeight = false,
-}: HoverGroupProps) => {
+export function HoverGroup({ bgColor, children, fullHeight = false }: HoverGroupProps) {
return (
= ({
{children}
);
-};
+}
diff --git a/src/renderer/components/primitives/Title.tsx b/src/renderer/components/primitives/Title.tsx
index f4709c015..360c77de4 100644
--- a/src/renderer/components/primitives/Title.tsx
+++ b/src/renderer/components/primitives/Title.tsx
@@ -1,4 +1,4 @@
-import type { FC, ReactNode } from 'react';
+import type { ReactNode } from 'react';
import type { Icon } from '@primer/octicons-react';
import { Heading, Stack } from '@primer/react';
@@ -12,7 +12,7 @@ interface TitleProps {
tooltip?: ReactNode;
}
-export const Title: FC = ({ size: _size = 2, ...props }) => {
+export function Title({ size: _size = 2, ...props }: TitleProps) {
const name = props.children.toLowerCase().replaceAll(' ', '-');
return (
@@ -35,4 +35,4 @@ export const Title: FC = ({ size: _size = 2, ...props }) => {
);
-};
+}
diff --git a/src/renderer/components/settings/AppearanceSettings.tsx b/src/renderer/components/settings/AppearanceSettings.tsx
index 20399fe54..f025c2261 100644
--- a/src/renderer/components/settings/AppearanceSettings.tsx
+++ b/src/renderer/components/settings/AppearanceSettings.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { PaintbrushIcon, SyncIcon, ZoomInIcon, ZoomOutIcon } from '@primer/octicons-react';
import { Button, ButtonGroup, IconButton, Select, Stack, Text } from '@primer/react';
@@ -20,7 +18,7 @@ import {
resetZoomLevel,
} from '../../utils/ui/zoom';
-export const AppearanceSettings: FC = () => {
+export function AppearanceSettings() {
// Account store values
const hasMultipleAccounts = useAccountsStore((s) => s.hasMultipleAccounts());
@@ -193,4 +191,4 @@ export const AppearanceSettings: FC = () => {
);
-};
+}
diff --git a/src/renderer/components/settings/NotificationSettings.tsx b/src/renderer/components/settings/NotificationSettings.tsx
index d6ce79b6e..cd9618334 100644
--- a/src/renderer/components/settings/NotificationSettings.tsx
+++ b/src/renderer/components/settings/NotificationSettings.tsx
@@ -1,4 +1,4 @@
-import type { FC, MouseEvent } from 'react';
+import type { MouseEvent } from 'react';
import { useNavigate } from 'react-router-dom';
import {
@@ -37,7 +37,7 @@ import { GroupBy, Size } from '../../types';
import { hasAlternateScopes, hasRecommendedScopes } from '../../utils/auth/scopes';
import { openGitHubParticipatingDocs } from '../../utils/system/links';
-export const NotificationSettings: FC = () => {
+export function NotificationSettings() {
const navigate = useNavigate();
// Account store values
@@ -418,4 +418,4 @@ export const NotificationSettings: FC = () => {
);
-};
+}
diff --git a/src/renderer/components/settings/SettingsFooter.tsx b/src/renderer/components/settings/SettingsFooter.tsx
index 94bea2d85..86b7861cf 100644
--- a/src/renderer/components/settings/SettingsFooter.tsx
+++ b/src/renderer/components/settings/SettingsFooter.tsx
@@ -1,4 +1,4 @@
-import { type FC, useEffect, useState } from 'react';
+import { useEffect, useState } from 'react';
import { PersonIcon, XCircleIcon } from '@primer/octicons-react';
import { Button, IconButton, Stack, Tooltip } from '@primer/react';
@@ -12,7 +12,7 @@ import { Footer } from '../primitives/Footer';
import { getAppVersion } from '../../utils/system/comms';
import { openGitifyReleaseNotes } from '../../utils/system/links';
-export const SettingsFooter: FC = () => {
+export function SettingsFooter() {
const [appVersion, setAppVersion] = useState(null);
const { shortcuts } = useShortcutActions();
@@ -63,4 +63,4 @@ export const SettingsFooter: FC = () => {
);
-};
+}
diff --git a/src/renderer/components/settings/SettingsReset.tsx b/src/renderer/components/settings/SettingsReset.tsx
index 3fe9d34dd..9a3989290 100644
--- a/src/renderer/components/settings/SettingsReset.tsx
+++ b/src/renderer/components/settings/SettingsReset.tsx
@@ -1,12 +1,10 @@
-import type { FC } from 'react';
-
import { Button, Stack, useConfirm } from '@primer/react';
import { useSettingsStore } from '../../stores';
import { rendererLogInfo } from '../../utils/core/logger';
-export const SettingsReset: FC = () => {
+export function SettingsReset() {
const resetSettings = useSettingsStore((s) => s.reset);
const confirm = useConfirm();
@@ -39,4 +37,4 @@ export const SettingsReset: FC = () => {
);
-};
+}
diff --git a/src/renderer/components/settings/SystemSettings.tsx b/src/renderer/components/settings/SystemSettings.tsx
index 2702bbf9c..e6dcbe98a 100644
--- a/src/renderer/components/settings/SystemSettings.tsx
+++ b/src/renderer/components/settings/SystemSettings.tsx
@@ -1,4 +1,4 @@
-import { type FC, useEffect, useRef, useState } from 'react';
+import { useEffect, useRef, useState } from 'react';
import { DeviceDesktopIcon, PencilIcon, SyncIcon } from '@primer/octicons-react';
import { Banner, Button, ButtonGroup, IconButton, Stack, Text } from '@primer/react';
@@ -34,7 +34,7 @@ import {
const defaultSettings = DEFAULT_SETTINGS_STATE;
-export const SystemSettings: FC = () => {
+export function SystemSettings() {
const shortcutRegistrationError = useShortcutRegistrationStore(
(s) => s.shortcutRegistrationError,
);
@@ -399,4 +399,4 @@ export const SystemSettings: FC = () => {
);
-};
+}
diff --git a/src/renderer/components/settings/TraySettings.tsx b/src/renderer/components/settings/TraySettings.tsx
index f74065f63..abfa5c7c0 100644
--- a/src/renderer/components/settings/TraySettings.tsx
+++ b/src/renderer/components/settings/TraySettings.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { DevicesIcon } from '@primer/octicons-react';
import { Stack, Text } from '@primer/react';
@@ -12,7 +10,7 @@ import { Checkbox } from '../fields/Checkbox';
import { RadioGroup } from '../fields/RadioGroup';
import { Title } from '../primitives/Title';
-export const TraySettings: FC = () => {
+export function TraySettings() {
const updateSetting = useSettingsStore((s) => s.updateSetting);
// Setting store actions
@@ -83,4 +81,4 @@ export const TraySettings: FC = () => {
);
-};
+}
diff --git a/src/renderer/icons/BitbucketIcon.tsx b/src/renderer/icons/BitbucketIcon.tsx
index b1e749769..3793ab8dc 100644
--- a/src/renderer/icons/BitbucketIcon.tsx
+++ b/src/renderer/icons/BitbucketIcon.tsx
@@ -1,28 +1,28 @@
-import type { FC } from 'react';
-
import type { OcticonProps } from '@primer/octicons-react';
/**
* Bitbucket brand icon (black-and-white, uses currentColor).
- * Implements FC so it is a drop-in for any place that expects an
+ * Takes OcticonProps so it is a drop-in for any place that expects an
* octicon-shaped component.
*/
-export const BitbucketIcon: FC = ({
+export function BitbucketIcon({
size = 16,
fill = 'currentColor',
className,
...props
-}) => (
-
-);
+}: OcticonProps) {
+ return (
+
+ );
+}
diff --git a/src/renderer/icons/GitLabIcon.tsx b/src/renderer/icons/GitLabIcon.tsx
index c81eee338..259c934f1 100644
--- a/src/renderer/icons/GitLabIcon.tsx
+++ b/src/renderer/icons/GitLabIcon.tsx
@@ -1,28 +1,28 @@
-import type { FC } from 'react';
-
import type { OcticonProps } from '@primer/octicons-react';
/**
* GitLab brand icon (black-and-white, uses currentColor).
- * Implements FC so it is a drop-in for any place that expects an
+ * Takes OcticonProps so it is a drop-in for any place that expects an
* octicon-shaped component.
*/
-export const GitLabIcon: FC = ({
+export function GitLabIcon({
size = 16,
fill = 'currentColor',
className,
...props
-}) => (
-
-);
+}: OcticonProps) {
+ return (
+
+ );
+}
diff --git a/src/renderer/icons/LogoIcon.tsx b/src/renderer/icons/LogoIcon.tsx
index 9ccda8052..a1a043532 100644
--- a/src/renderer/icons/LogoIcon.tsx
+++ b/src/renderer/icons/LogoIcon.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { cn } from 'cn';
import { APPLICATION } from '../../shared/constants';
@@ -18,48 +16,45 @@ const LIGHT_GRADIENT_END = '#FFFFFF';
const DARK_GRADIENT_START = '#22283B';
const DARK_GRADIENT_END = '#555B6E';
-export const LogoIcon: FC = ({
- isDark,
- onClick,
- size = Size.SMALL,
- ...props
-}: LogoIconProps) => (
- // oxlint-disable-next-line jsx-a11y/click-events-have-key-events -- Logo is purely decorative
-
-);
+
+ );
+}
diff --git a/src/renderer/icons/ScopeStatusIcon.tsx b/src/renderer/icons/ScopeStatusIcon.tsx
index 22525782e..bfc9ff20c 100644
--- a/src/renderer/icons/ScopeStatusIcon.tsx
+++ b/src/renderer/icons/ScopeStatusIcon.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { CheckCircleFillIcon, DashIcon, XCircleFillIcon } from '@primer/octicons-react';
export interface ScopeStatusIconProps {
@@ -9,12 +7,12 @@ export interface ScopeStatusIconProps {
withTestId?: boolean;
}
-export const ScopeStatusIcon: FC = ({
+export function ScopeStatusIcon({
granted,
notApplicable = false,
size = 14,
withTestId = false,
-}) => {
+}: ScopeStatusIconProps) {
if (notApplicable) {
return (
= ({
size={size}
/>
);
-};
+}
diff --git a/src/renderer/icons/VolumeDownIcon.tsx b/src/renderer/icons/VolumeDownIcon.tsx
index b29824be1..cb5f7e59c 100644
--- a/src/renderer/icons/VolumeDownIcon.tsx
+++ b/src/renderer/icons/VolumeDownIcon.tsx
@@ -1,19 +1,19 @@
-import type { FC } from 'react';
-
-export const VolumeDownIcon: FC = () => (
-
-
-
-
-
-
-);
+export function VolumeDownIcon() {
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/src/renderer/icons/VolumeUpIcon.tsx b/src/renderer/icons/VolumeUpIcon.tsx
index cfcffbffd..039ea8e22 100644
--- a/src/renderer/icons/VolumeUpIcon.tsx
+++ b/src/renderer/icons/VolumeUpIcon.tsx
@@ -1,17 +1,17 @@
-import type { FC } from 'react';
-
-export const VolumeUpIcon: FC = () => (
-
-
-
-
-);
+export function VolumeUpIcon() {
+ return (
+
+
+
+
+ );
+}
diff --git a/src/renderer/routes/AccountScopes.tsx b/src/renderer/routes/AccountScopes.tsx
index 285c27476..a224a9ec4 100644
--- a/src/renderer/routes/AccountScopes.tsx
+++ b/src/renderer/routes/AccountScopes.tsx
@@ -1,4 +1,3 @@
-import type { FC } from 'react';
import { useLocation } from 'react-router-dom';
import { AlertFillIcon, LinkExternalIcon, ShieldCheckIcon } from '@primer/octicons-react';
@@ -27,7 +26,7 @@ interface LocationState {
account: Account;
}
-export const AccountScopesRoute: FC = () => {
+export function AccountScopesRoute() {
const location = useLocation();
const { account } = location.state as LocationState;
@@ -212,4 +211,4 @@ export const AccountScopesRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/Accounts.tsx b/src/renderer/routes/Accounts.tsx
index 066af7164..f6c6a0e65 100644
--- a/src/renderer/routes/Accounts.tsx
+++ b/src/renderer/routes/Accounts.tsx
@@ -41,13 +41,13 @@ import { getAdapter, listAdapters } from '../utils/forges/registry';
import { openAccountProfile, openAccountSettings, openHost } from '../utils/system/links';
import { getPlatformIcon } from '../utils/ui/icons';
-const RecommendedScopesIcon: FC = ({ className, ...props }) => (
-
-);
+function RecommendedScopesIcon({ className, ...props }: OcticonProps) {
+ return ;
+}
-const AlternateScopesIcon: FC = ({ className, ...props }) => (
-
-);
+function AlternateScopesIcon({ className, ...props }: OcticonProps) {
+ return ;
+}
function getScopeIcon(account: Account): FC {
if (hasRecommendedScopes(account)) {
@@ -59,7 +59,7 @@ function getScopeIcon(account: Account): FC {
return ShieldCheckIcon;
}
-export const AccountsRoute: FC = () => {
+export function AccountsRoute() {
const navigate = useNavigate();
const { logoutFromAccount } = useLogins();
@@ -407,4 +407,4 @@ export const AccountsRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/Filters.tsx b/src/renderer/routes/Filters.tsx
index 7a7dca6ce..3172a8a17 100644
--- a/src/renderer/routes/Filters.tsx
+++ b/src/renderer/routes/Filters.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { FilterIcon, FilterRemoveIcon } from '@primer/octicons-react';
import { Button, Stack, Tooltip } from '@primer/react';
@@ -17,7 +15,7 @@ import { Page } from '../components/layout/Page';
import { Footer } from '../components/primitives/Footer';
import { Header } from '../components/primitives/Header';
-export const FiltersRoute: FC = () => {
+export function FiltersRoute() {
const clearFilters = useFiltersStore((s) => s.reset);
const hasMultipleAccounts = useAccountsStore((s) => s.hasMultipleAccounts());
@@ -53,4 +51,4 @@ export const FiltersRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/Login.tsx b/src/renderer/routes/Login.tsx
index 525e5dab1..2e85a5f69 100644
--- a/src/renderer/routes/Login.tsx
+++ b/src/renderer/routes/Login.tsx
@@ -1,4 +1,4 @@
-import { type FC, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
+import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Button, Heading, Stack, Text } from '@primer/react';
@@ -24,7 +24,7 @@ function pickPrimaryMethod(adapter: ForgeAdapter): LoginMethodDescriptor | undef
return adapter.loginMethods.find((m) => m.variant === 'primary') ?? adapter.loginMethods[0];
}
-export const LoginRoute: FC = () => {
+export function LoginRoute() {
const navigate = useNavigate();
const adapters = listAdapters();
@@ -208,4 +208,4 @@ export const LoginRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/Notifications.tsx b/src/renderer/routes/Notifications.tsx
index 614df59d4..2e5d65196 100644
--- a/src/renderer/routes/Notifications.tsx
+++ b/src/renderer/routes/Notifications.tsx
@@ -1,4 +1,4 @@
-import { type FC, useMemo } from 'react';
+import { useMemo } from 'react';
import { useNotifications } from '../hooks/useNotifications';
import { useOnlineStatus } from '../hooks/useOnlineStatus';
@@ -13,7 +13,7 @@ import { getAccountUUID } from '../utils/auth/utils';
import { Errors } from '../utils/core/errors';
import { hasNoAccountErrors } from '../utils/notifications/status';
-export const NotificationsRoute: FC = () => {
+export function NotificationsRoute() {
const { notifications, status, globalError, hasNotifications } = useNotifications();
const isOnline = useOnlineStatus();
@@ -54,4 +54,4 @@ export const NotificationsRoute: FC = () => {
/>
);
-};
+}
diff --git a/src/renderer/routes/Settings.tsx b/src/renderer/routes/Settings.tsx
index 4a98bd4ba..a3bf61be0 100644
--- a/src/renderer/routes/Settings.tsx
+++ b/src/renderer/routes/Settings.tsx
@@ -1,5 +1,3 @@
-import type { FC } from 'react';
-
import { GearIcon } from '@primer/octicons-react';
import { Stack } from '@primer/react';
@@ -13,7 +11,7 @@ import { SettingsReset } from '../components/settings/SettingsReset';
import { SystemSettings } from '../components/settings/SystemSettings';
import { TraySettings } from '../components/settings/TraySettings';
-export const SettingsRoute: FC = () => {
+export function SettingsRoute() {
return (
@@ -33,4 +31,4 @@ export const SettingsRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/bitbucket/LoginWithPersonalAccessToken.tsx b/src/renderer/routes/bitbucket/LoginWithPersonalAccessToken.tsx
index f3a1e3c0b..fa1e2a660 100644
--- a/src/renderer/routes/bitbucket/LoginWithPersonalAccessToken.tsx
+++ b/src/renderer/routes/bitbucket/LoginWithPersonalAccessToken.tsx
@@ -1,18 +1,18 @@
-import type { FC } from 'react';
-
import { LoginWithPersonalAccessTokenForm } from '../../components/login/LoginWithPersonalAccessTokenForm';
-export const BitbucketLoginWithPersonalAccessTokenRoute: FC = () => (
-
-);
+export function BitbucketLoginWithPersonalAccessTokenRoute() {
+ return (
+
+ );
+}
diff --git a/src/renderer/routes/gitea/LoginWithPersonalAccessToken.tsx b/src/renderer/routes/gitea/LoginWithPersonalAccessToken.tsx
index 6a3291402..d806605b4 100644
--- a/src/renderer/routes/gitea/LoginWithPersonalAccessToken.tsx
+++ b/src/renderer/routes/gitea/LoginWithPersonalAccessToken.tsx
@@ -1,16 +1,16 @@
-import type { FC } from 'react';
-
import { LoginWithPersonalAccessTokenForm } from '../../components/login/LoginWithPersonalAccessTokenForm';
-export const GiteaLoginWithPersonalAccessTokenRoute: FC = () => (
-
-);
+export function GiteaLoginWithPersonalAccessTokenRoute() {
+ return (
+
+ );
+}
diff --git a/src/renderer/routes/github/LoginWithDeviceFlow.tsx b/src/renderer/routes/github/LoginWithDeviceFlow.tsx
index 49b26f855..8c2e1dcbb 100644
--- a/src/renderer/routes/github/LoginWithDeviceFlow.tsx
+++ b/src/renderer/routes/github/LoginWithDeviceFlow.tsx
@@ -1,4 +1,4 @@
-import { type FC, type ReactNode, useCallback, useEffect, useState } from 'react';
+import { type ReactNode, useCallback, useEffect, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import {
@@ -34,7 +34,7 @@ interface LocationState {
type ScopeChoice = 'public' | 'full';
-export const GitHubLoginWithDeviceFlowRoute: FC = () => {
+export function GitHubLoginWithDeviceFlowRoute() {
const navigate = useNavigate();
const location = useLocation();
const { account: reAuthAccount } = (location.state ?? {}) as LocationState;
@@ -355,4 +355,4 @@ export const GitHubLoginWithDeviceFlowRoute: FC = () => {
)}
);
-};
+}
diff --git a/src/renderer/routes/github/LoginWithGitHubCLI.tsx b/src/renderer/routes/github/LoginWithGitHubCLI.tsx
index 84f7e35e6..e74b579af 100644
--- a/src/renderer/routes/github/LoginWithGitHubCLI.tsx
+++ b/src/renderer/routes/github/LoginWithGitHubCLI.tsx
@@ -1,4 +1,4 @@
-import { type FC, useCallback, useState } from 'react';
+import { useCallback, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { SignInIcon, TerminalIcon } from '@primer/octicons-react';
@@ -23,7 +23,7 @@ interface LocationState {
account?: Account;
}
-export const GitHubLoginWithCLIRoute: FC = () => {
+export function GitHubLoginWithCLIRoute() {
const navigate = useNavigate();
const location = useLocation();
const { account: reAuthAccount } = (location.state ?? {}) as LocationState;
@@ -115,4 +115,4 @@ export const GitHubLoginWithCLIRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/github/LoginWithOAuthApp.tsx b/src/renderer/routes/github/LoginWithOAuthApp.tsx
index 969ebdd1d..aa6df4c7c 100644
--- a/src/renderer/routes/github/LoginWithOAuthApp.tsx
+++ b/src/renderer/routes/github/LoginWithOAuthApp.tsx
@@ -1,4 +1,4 @@
-import { type FC, useCallback, useState } from 'react';
+import { useCallback, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { BookIcon, EyeClosedIcon, EyeIcon, PersonIcon, SignInIcon } from '@primer/octicons-react';
@@ -28,7 +28,7 @@ interface LocationState {
account?: Account;
}
-export const GitHubLoginWithOAuthAppRoute: FC = () => {
+export function GitHubLoginWithOAuthAppRoute() {
const navigate = useNavigate();
const location = useLocation();
const { account: reAuthAccount } = (location.state ?? {}) as LocationState;
@@ -213,4 +213,4 @@ export const GitHubLoginWithOAuthAppRoute: FC = () => {
);
-};
+}
diff --git a/src/renderer/routes/github/LoginWithPersonalAccessToken.tsx b/src/renderer/routes/github/LoginWithPersonalAccessToken.tsx
index 36c8c997e..b4b5ff44c 100644
--- a/src/renderer/routes/github/LoginWithPersonalAccessToken.tsx
+++ b/src/renderer/routes/github/LoginWithPersonalAccessToken.tsx
@@ -1,30 +1,30 @@
-import type { FC } from 'react';
-
import { Text, Tooltip } from '@primer/react';
import { LoginWithPersonalAccessTokenForm } from '../../components/login/LoginWithPersonalAccessTokenForm';
import { formatRecommendedOAuthScopes } from '../../utils/auth/scopes';
-export const GitHubLoginWithPersonalAccessTokenRoute: FC = () => (
-
-
- The{' '}
-
-
- {' '}
- will be automatically selected for you.
-
-
-);
+export function GitHubLoginWithPersonalAccessTokenRoute() {
+ return (
+
+
+ The{' '}
+
+
+ {' '}
+ will be automatically selected for you.
+
+
+ );
+}
diff --git a/src/renderer/routes/gitlab/LoginWithPersonalAccessToken.tsx b/src/renderer/routes/gitlab/LoginWithPersonalAccessToken.tsx
index dbe9bcf9b..ab329b1b6 100644
--- a/src/renderer/routes/gitlab/LoginWithPersonalAccessToken.tsx
+++ b/src/renderer/routes/gitlab/LoginWithPersonalAccessToken.tsx
@@ -1,24 +1,24 @@
-import type { FC } from 'react';
-
import { Text } from '@primer/react';
import { LoginWithPersonalAccessTokenForm } from '../../components/login/LoginWithPersonalAccessTokenForm';
-export const GitLabLoginWithPersonalAccessTokenRoute: FC = () => (
-
-
- Requires the api scope, or a fine-grained token with{' '}
- Todo (read, update) and{' '}
- User (read) permissions. GitLab shows your To-Do items,
- so you will see fewer notifications than on GitHub.
-
-
-);
+export function GitLabLoginWithPersonalAccessTokenRoute() {
+ return (
+
+
+ Requires the api scope, or a fine-grained token with{' '}
+ Todo (read, update) and{' '}
+ User (read) permissions. GitLab shows your To-Do
+ items, so you will see fewer notifications than on GitHub.
+
+
+ );
+}
diff --git a/vite.config.mts b/vite.config.mts
index 9aaf77e5f..11ecf55ae 100644
--- a/vite.config.mts
+++ b/vite.config.mts
@@ -185,6 +185,13 @@ export default defineConfig({
'default-param-last': 'error',
'default-case': 'error',
curly: 'error',
+ 'react/function-component-definition': [
+ 'error',
+ {
+ namedComponents: 'function-declaration',
+ unnamedComponents: 'arrow-function',
+ },
+ ],
'react/exhaustive-deps': 'warn',
'react/rules-of-hooks': 'error',
'react/self-closing-comp': 'error',