diff --git a/front/src/hooks/useFetch.ts b/front/src/hooks/useFetch.ts index ff483b3..41e9ab6 100644 --- a/front/src/hooks/useFetch.ts +++ b/front/src/hooks/useFetch.ts @@ -54,7 +54,7 @@ function useFetch( useEffect(() => { doSend().then( data => { if (data !== undefined) setData(data) } - ).catch( + ).catch( // must never occur err => import.meta.env.DEV && console.error('Failed to do fetch request', err) ) }, [doSend]) diff --git a/front/src/hooks/useStoryDimensions.ts b/front/src/hooks/useStoryDimensions.ts index 96eac52..7d69655 100644 --- a/front/src/hooks/useStoryDimensions.ts +++ b/front/src/hooks/useStoryDimensions.ts @@ -1,15 +1,13 @@ import { useState, useEffect } from 'react'; -function getWindowDimensions() { - const { innerWidth: width, innerHeight: height } = window; +const getWindowDimensions = () => ( + { + width: window.innerWidth, + height: window.innerHeight + } +) - return { - width, - height - }; -} - -function useStoryDimensions(maxRatio = 16/9) { +function useStoryDimensions(maxRatio = 16 / 9) { const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions()) useEffect(() => { diff --git a/front/src/pages/HomePage.tsx b/front/src/pages/HomePage.tsx index e8c5854..9ac9435 100644 --- a/front/src/pages/HomePage.tsx +++ b/front/src/pages/HomePage.tsx @@ -70,8 +70,6 @@ function HomePage() { const announcementsFetch = useAnnouncements(filter) - // console.log(announcementsFetch) - const stories = fallbackGenerateStories(announcementsFetch) return (<> diff --git a/front/src/utils/types.ts b/front/src/utils/types.ts index a74a6f5..4ac3255 100644 --- a/front/src/utils/types.ts +++ b/front/src/utils/types.ts @@ -21,7 +21,7 @@ const isObject = (obj: unknown, properties: PropertiesGuards): obj is T => ( const param: unknown = Reflect.get(obj, name) if (import.meta.env.DEV) { - console.log(name, param, guard) + console.debug('isObject', name, param, guard) } if (typeof guard === 'function') {