From 416478ef3f72e3e5ecf00e0aa55402a203aba887 Mon Sep 17 00:00:00 2001 From: Jeremy Green <20728342+jg210@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:16:49 +0000 Subject: [PATCH] eslint fixes. --- src/Authorities.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Authorities.tsx b/src/Authorities.tsx index 27965e2..6a26f9e 100644 --- a/src/Authorities.tsx +++ b/src/Authorities.tsx @@ -3,7 +3,7 @@ import { Suspense } from "react"; import { FlatList, Text } from "react-native"; interface localAuthorities { - localAuthorities: LocalAuthority[] + localAuthorities: LocalAuthority[]; } interface LocalAuthority { @@ -13,8 +13,10 @@ interface LocalAuthority { const queryKey = ["authorities"]; const getAuthorities: () => Promise = async () => { - const authorities = await fetch("https://aws.jeremygreen.me.uk/api/fsa/localAuthority"); - const json = await authorities.json() as unknown as localAuthorities; + const authorities = await fetch( + "https://aws.jeremygreen.me.uk/api/fsa/localAuthority", + ); + const json = (await authorities.json()) as unknown as localAuthorities; return json.localAuthorities; }; @@ -28,12 +30,12 @@ const Fallback = () => loading...; export const Authorities = () => { const { data } = useSuspenseQuery({ queryKey, queryFn: getAuthorities }); return ( - }> - } - keyExtractor={(item) => item.localAuthorityId.toString()} - /> + }> + } + keyExtractor={(item) => item.localAuthorityId.toString()} + /> ); };