From aadb5f9f6d5e26792352b10b708a76ac037ceb69 Mon Sep 17 00:00:00 2001 From: Uruk Date: Tue, 24 Feb 2026 14:58:45 +0100 Subject: [PATCH] refactor(app): rename default function components Renames default function components to PascalCase for consistency. This change improves code readability and adheres to React component naming conventions. --- app/(auth)/(tabs)/(custom-links)/index.tsx | 2 +- app/(auth)/(tabs)/(favorites)/index.tsx | 3 +-- app/(auth)/(tabs)/(home)/downloads/index.tsx | 2 +- app/(auth)/(tabs)/(home)/sessions/index.tsx | 2 +- app/(auth)/(tabs)/(home)/settings.tsx | 2 +- .../(home)/settings/appearance/hide-libraries/page.tsx | 2 +- .../(tabs)/(home)/settings/hide-libraries/page.tsx | 2 +- .../(tabs)/(home)/settings/plugins/jellyseerr/page.tsx | 2 +- .../(tabs)/(home)/settings/plugins/kefinTweaks/page.tsx | 2 +- .../(home)/settings/plugins/marlin-search/page.tsx | 2 +- .../(tabs)/(home)/settings/plugins/streamystats/page.tsx | 2 +- .../jellyseerr/company/[companyId].tsx | 2 +- .../jellyseerr/genre/[genreId].tsx | 2 +- .../jellyseerr/person/[personId].tsx | 2 +- .../livetv/channels.tsx | 2 +- .../livetv/guide.tsx | 2 +- .../livetv/programs.tsx | 2 +- .../livetv/recordings.tsx | 2 +- app/(auth)/(tabs)/(libraries)/index.tsx | 2 +- app/(auth)/(tabs)/(search)/index.tsx | 2 +- app/(auth)/player/direct-player.tsx | 2 +- components/video-player/controls/Controls.tsx | 1 - .../video-player/controls/TechnicalInfoOverlay.tsx | 9 +-------- 23 files changed, 22 insertions(+), 31 deletions(-) diff --git a/app/(auth)/(tabs)/(custom-links)/index.tsx b/app/(auth)/(tabs)/(custom-links)/index.tsx index 8dbb1866..47ee3bda 100644 --- a/app/(auth)/(tabs)/(custom-links)/index.tsx +++ b/app/(auth)/(tabs)/(custom-links)/index.tsx @@ -16,7 +16,7 @@ export interface MenuLink { icon: string; } -export default function menuLinks() { +export default function MenuLinks() { const [api] = useAtom(apiAtom); const insets = useSafeAreaInsets(); const [menuLinks, setMenuLinks] = useState([]); diff --git a/app/(auth)/(tabs)/(favorites)/index.tsx b/app/(auth)/(tabs)/(favorites)/index.tsx index 198695a8..ed502cb9 100644 --- a/app/(auth)/(tabs)/(favorites)/index.tsx +++ b/app/(auth)/(tabs)/(favorites)/index.tsx @@ -1,10 +1,9 @@ import { useCallback, useState } from "react"; import { Platform, RefreshControl, ScrollView, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; -import { Favorites } from "@/components/home/Favorites"; import { useInvalidatePlaybackProgressCache } from "@/hooks/useRevalidatePlaybackProgressCache"; -export default function favorites() { +export default function Favorites() { const invalidateCache = useInvalidatePlaybackProgressCache(); const [loading, setLoading] = useState(false); diff --git a/app/(auth)/(tabs)/(home)/downloads/index.tsx b/app/(auth)/(tabs)/(home)/downloads/index.tsx index fb8ef0b9..1b41ffe6 100644 --- a/app/(auth)/(tabs)/(home)/downloads/index.tsx +++ b/app/(auth)/(tabs)/(home)/downloads/index.tsx @@ -20,7 +20,7 @@ import { OfflineModeProvider } from "@/providers/OfflineModeProvider"; import { queueAtom } from "@/utils/atoms/queue"; import { writeToLog } from "@/utils/log"; -export default function page() { +export default function Page() { const navigation = useNavigation(); const { t } = useTranslation(); const [_queue, _setQueue] = useAtom(queueAtom); diff --git a/app/(auth)/(tabs)/(home)/sessions/index.tsx b/app/(auth)/(tabs)/(home)/sessions/index.tsx index 0ed8fc94..fcb2b368 100644 --- a/app/(auth)/(tabs)/(home)/sessions/index.tsx +++ b/app/(auth)/(tabs)/(home)/sessions/index.tsx @@ -23,7 +23,7 @@ import { formatBitrate } from "@/utils/bitrate"; import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl"; import { formatTimeString } from "@/utils/time"; -export default function page() { +export default function Page() { const { sessions, isLoading } = useSessions({} as useSessionsProps); const { t } = useTranslation(); diff --git a/app/(auth)/(tabs)/(home)/settings.tsx b/app/(auth)/(tabs)/(home)/settings.tsx index 76675ae8..0fb144d4 100644 --- a/app/(auth)/(tabs)/(home)/settings.tsx +++ b/app/(auth)/(tabs)/(home)/settings.tsx @@ -14,7 +14,7 @@ import { UserInfo } from "@/components/settings/UserInfo"; import useRouter from "@/hooks/useAppRouter"; import { useJellyfin, userAtom } from "@/providers/JellyfinProvider"; -export default function settings() { +export default function Settings() { const router = useRouter(); const insets = useSafeAreaInsets(); const [_user] = useAtom(userAtom); diff --git a/app/(auth)/(tabs)/(home)/settings/appearance/hide-libraries/page.tsx b/app/(auth)/(tabs)/(home)/settings/appearance/hide-libraries/page.tsx index a0b3bab9..49da0f94 100644 --- a/app/(auth)/(tabs)/(home)/settings/appearance/hide-libraries/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/appearance/hide-libraries/page.tsx @@ -12,7 +12,7 @@ import DisabledSetting from "@/components/settings/DisabledSetting"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const { settings, updateSettings, pluginSettings } = useSettings(); const user = useAtomValue(userAtom); const api = useAtomValue(apiAtom); diff --git a/app/(auth)/(tabs)/(home)/settings/hide-libraries/page.tsx b/app/(auth)/(tabs)/(home)/settings/hide-libraries/page.tsx index e1c8b56b..3f94fb88 100644 --- a/app/(auth)/(tabs)/(home)/settings/hide-libraries/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/hide-libraries/page.tsx @@ -11,7 +11,7 @@ import DisabledSetting from "@/components/settings/DisabledSetting"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const { settings, updateSettings, pluginSettings } = useSettings(); const user = useAtomValue(userAtom); const api = useAtomValue(apiAtom); diff --git a/app/(auth)/(tabs)/(home)/settings/plugins/jellyseerr/page.tsx b/app/(auth)/(tabs)/(home)/settings/plugins/jellyseerr/page.tsx index cd1efca5..8558356e 100644 --- a/app/(auth)/(tabs)/(home)/settings/plugins/jellyseerr/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/plugins/jellyseerr/page.tsx @@ -4,7 +4,7 @@ import DisabledSetting from "@/components/settings/DisabledSetting"; import { JellyseerrSettings } from "@/components/settings/Jellyseerr"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const { pluginSettings } = useSettings(); const insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home)/settings/plugins/kefinTweaks/page.tsx b/app/(auth)/(tabs)/(home)/settings/plugins/kefinTweaks/page.tsx index 05056826..64b453d7 100644 --- a/app/(auth)/(tabs)/(home)/settings/plugins/kefinTweaks/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/plugins/kefinTweaks/page.tsx @@ -4,7 +4,7 @@ import DisabledSetting from "@/components/settings/DisabledSetting"; import { KefinTweaksSettings } from "@/components/settings/KefinTweaks"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const { pluginSettings } = useSettings(); const insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home)/settings/plugins/marlin-search/page.tsx b/app/(auth)/(tabs)/(home)/settings/plugins/marlin-search/page.tsx index 10be4af5..5202e47e 100644 --- a/app/(auth)/(tabs)/(home)/settings/plugins/marlin-search/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/plugins/marlin-search/page.tsx @@ -18,7 +18,7 @@ import DisabledSetting from "@/components/settings/DisabledSetting"; import { useNetworkAwareQueryClient } from "@/hooks/useNetworkAwareQueryClient"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const navigation = useNavigation(); const { t } = useTranslation(); diff --git a/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx b/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx index 697db6c4..b96aa82a 100644 --- a/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx @@ -17,7 +17,7 @@ import { ListItem } from "@/components/list/ListItem"; import { useNetworkAwareQueryClient } from "@/hooks/useNetworkAwareQueryClient"; import { useSettings } from "@/utils/atoms/settings"; -export default function page() { +export default function Page() { const { t } = useTranslation(); const navigation = useNavigation(); const insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/company/[companyId].tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/company/[companyId].tsx index fdcd786c..096e1a28 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/company/[companyId].tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/company/[companyId].tsx @@ -13,7 +13,7 @@ import { } from "@/utils/jellyseerr/server/models/Search"; import { COMPANY_LOGO_IMAGE_FILTER } from "@/utils/jellyseerr/src/components/Discover/NetworkSlider"; -export default function page() { +export default function Page() { const local = useLocalSearchParams(); const { jellyseerrApi, isJellyseerrMovieOrTvResult } = useJellyseerr(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/genre/[genreId].tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/genre/[genreId].tsx index 7ea00808..6a2246ad 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/genre/[genreId].tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/genre/[genreId].tsx @@ -9,7 +9,7 @@ import JellyseerrPoster from "@/components/posters/JellyseerrPoster"; import { Endpoints, useJellyseerr } from "@/hooks/useJellyseerr"; import { DiscoverSliderType } from "@/utils/jellyseerr/server/constants/discover"; -export default function page() { +export default function Page() { const local = useLocalSearchParams(); const { jellyseerrApi, isJellyseerrMovieOrTvResult } = useJellyseerr(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/person/[personId].tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/person/[personId].tsx index a29e1280..d824e870 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/person/[personId].tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/jellyseerr/person/[personId].tsx @@ -11,7 +11,7 @@ import JellyseerrPoster from "@/components/posters/JellyseerrPoster"; import { useJellyseerr } from "@/hooks/useJellyseerr"; import type { PersonCreditCast } from "@/utils/jellyseerr/server/models/Person"; -export default function page() { +export default function Page() { const local = useLocalSearchParams(); const { t } = useTranslation(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/channels.tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/channels.tsx index 6c9790b5..6aab663f 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/channels.tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/channels.tsx @@ -8,7 +8,7 @@ import { ItemImage } from "@/components/common/ItemImage"; import { Text } from "@/components/common/Text"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; -export default function page() { +export default function Page() { const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const _insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/guide.tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/guide.tsx index 390e8eb6..a4d4d1df 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/guide.tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/guide.tsx @@ -17,7 +17,7 @@ const ITEMS_PER_PAGE = 20; const MemoizedLiveTVGuideRow = React.memo(LiveTVGuideRow); -export default function page() { +export default function Page() { const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/programs.tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/programs.tsx index 812d084d..4ff99938 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/programs.tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/programs.tsx @@ -7,7 +7,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context"; import { ScrollingCollectionList } from "@/components/home/ScrollingCollectionList"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; -export default function page() { +export default function Page() { const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const insets = useSafeAreaInsets(); diff --git a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/recordings.tsx b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/recordings.tsx index 9a390162..76c269ca 100644 --- a/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/recordings.tsx +++ b/app/(auth)/(tabs)/(home,libraries,search,favorites,watchlists)/livetv/recordings.tsx @@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next"; import { View } from "react-native"; import { Text } from "@/components/common/Text"; -export default function page() { +export default function Page() { const { t } = useTranslation(); return ( diff --git a/app/(auth)/(tabs)/(libraries)/index.tsx b/app/(auth)/(tabs)/(libraries)/index.tsx index 37b89bbf..e4a04797 100644 --- a/app/(auth)/(tabs)/(libraries)/index.tsx +++ b/app/(auth)/(tabs)/(libraries)/index.tsx @@ -15,7 +15,7 @@ import { LibraryItemCard } from "@/components/library/LibraryItemCard"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { useSettings } from "@/utils/atoms/settings"; -export default function index() { +export default function Index() { const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const queryClient = useQueryClient(); diff --git a/app/(auth)/(tabs)/(search)/index.tsx b/app/(auth)/(tabs)/(search)/index.tsx index 751b1df1..224a118a 100644 --- a/app/(auth)/(tabs)/(search)/index.tsx +++ b/app/(auth)/(tabs)/(search)/index.tsx @@ -55,7 +55,7 @@ const exampleSearches = [ "The Mandalorian", ]; -export default function search() { +export default function Search() { const params = useLocalSearchParams(); const insets = useSafeAreaInsets(); const router = useRouter(); diff --git a/app/(auth)/player/direct-player.tsx b/app/(auth)/player/direct-player.tsx index a4cffe77..b42f549f 100644 --- a/app/(auth)/player/direct-player.tsx +++ b/app/(auth)/player/direct-player.tsx @@ -58,7 +58,7 @@ import { writeToLog } from "@/utils/log"; import { generateDeviceProfile } from "@/utils/profiles/native"; import { msToTicks, ticksToSeconds } from "@/utils/time"; -export default function page() { +export default function Page() { const videoRef = useRef(null); const user = useAtomValue(userAtom); const api = useAtomValue(apiAtom); diff --git a/components/video-player/controls/Controls.tsx b/components/video-player/controls/Controls.tsx index 96dfad6b..51b82067 100644 --- a/components/video-player/controls/Controls.tsx +++ b/components/video-player/controls/Controls.tsx @@ -476,7 +476,6 @@ export const Controls: FC = ({ {/* Technical Info Overlay - rendered outside animated views to stay visible */} {getTechnicalInfo && ( Promise; playMethod?: PlayMethod; @@ -120,13 +119,7 @@ const formatTranscodeReason = (reason: string): string => { }; export const TechnicalInfoOverlay: FC = memo( - ({ - showControls, - visible, - getTechnicalInfo, - playMethod, - transcodeReasons, - }) => { + ({ visible, getTechnicalInfo, playMethod, transcodeReasons }) => { const { settings } = useSettings(); const insets = useSafeAreaInsets(); const [info, setInfo] = useState(null);