diff --git a/app/containers/message/helpers/mediaDownload/autoDownloadPreference.ts b/app/containers/message/helpers/mediaDownload/autoDownloadPreference.ts index d096fb41a..79b29df21 100644 --- a/app/containers/message/helpers/mediaDownload/autoDownloadPreference.ts +++ b/app/containers/message/helpers/mediaDownload/autoDownloadPreference.ts @@ -1,5 +1,4 @@ import NetInfo, { NetInfoStateType } from '@react-native-community/netinfo'; -import { useEffect, useState } from 'react'; import { IMAGES_PREFERENCE_DOWNLOAD, @@ -26,18 +25,3 @@ export const isAutoDownloadEnabled = async (mediaType: TMediaType, { author, use author?._id === user.id ); }; - -export const useAutoDownloadEnabled = (mediaType: TMediaType, { author, user }: IUsersParam) => { - const [enabled, setEnabled] = useState(false); - - useEffect(() => { - const handleAutoDownload = async () => { - const result = await isAutoDownloadEnabled(mediaType, { author, user }); - console.log('🚀 ~ file: autoDownloadPreference.ts:38 ~ handleAutoDownload ~ result:', result); - setEnabled(result); - }; - handleAutoDownload(); - }, []); - - return enabled; -};