From 2c0ba18b4976c888129ae2848b4625588e0d8baa Mon Sep 17 00:00:00 2001 From: Simon Caron <8635747+simoncaron@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:10:46 -0500 Subject: [PATCH] Clean up const declarations --- app/(auth)/(tabs)/(libraries)/index.tsx | 4 ++-- app/(auth)/(tabs)/(search)/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/(auth)/(tabs)/(libraries)/index.tsx b/app/(auth)/(tabs)/(libraries)/index.tsx index 4ca1cef4..06ce1dbd 100644 --- a/app/(auth)/(tabs)/(libraries)/index.tsx +++ b/app/(auth)/(tabs)/(libraries)/index.tsx @@ -21,6 +21,8 @@ export default function index() { const queryClient = useQueryClient(); const [settings] = useSettings(); + const { t } = useTranslation(); + const { data, isLoading: isLoading } = useQuery({ queryKey: ["user-views", user?.Id], queryFn: async () => { @@ -55,8 +57,6 @@ export default function index() { } }, [data]); - const { t } = useTranslation(); - const insets = useSafeAreaInsets(); if (isLoading) diff --git a/app/(auth)/(tabs)/(search)/index.tsx b/app/(auth)/(tabs)/(search)/index.tsx index 81acd37c..719cd3e9 100644 --- a/app/(auth)/(tabs)/(search)/index.tsx +++ b/app/(auth)/(tabs)/(search)/index.tsx @@ -54,6 +54,8 @@ export default function search() { const params = useLocalSearchParams(); const insets = useSafeAreaInsets(); + const { t } = useTranslation(); + const { q, prev } = params as { q: string; prev: Href }; const [searchType, setSearchType] = useState("Library"); @@ -121,7 +123,6 @@ export default function search() { }, [api, searchEngine, settings] ); - const { t } = useTranslation(); const navigation = useNavigation(); useLayoutEffect(() => {