import { useSelect } from '@wordpress/data'; import Preview from './preview'; import Export from './export'; import TemplatesContent from './templates-content'; const Content = ( { importTemplate, getOrder, setQuery, getSearchQuery, setSorting, isSearch, setSearch, } ) => { const isFetching = useSelect( ( select ) => select( 'tpc/beaver' ).isFetching() ); const isPreview = useSelect( ( select ) => select( 'tpc/beaver' ).isPreview() ); const currentTab = useSelect( ( select ) => select( 'tpc/beaver' ).getCurrentTab() ); if ( isPreview ) { return ( ); } if ( 'export' === currentTab ) { return ; } return (
); }; export default Content; /* global localStorage, lodash, FLBuilder */ import { stringifyUrl } from 'query-string'; import { v4 as uuidv4 } from 'uuid'; import apiFetch from '@wordpress/api-fetch'; import { dispatch, select } from '@wordpress/data'; const { omit } = lodash; const dispatchNotification = ( message ) => FLBuilder.alert( message ); const { setFetching } = dispatch( 'tpc/beaver' ); export const fetchTemplates = async ( additionalParams = {} ) => { const params = { cache: localStorage.getItem( 'tpcCacheBuster' ), ...window.tiTpc.params, per_page: 20, page: 0, premade: true, template_site_slug: 'general', ...omit( additionalParams, 'isScroll' ), }; const url = stringifyUrl( { url: window.tiTpc.endpoint + 'page-templates', query: params, } ); try { setFetching( true ); const response = await apiFetch( { url, method: 'GET', parse: false, } ); setFetching( false ); if ( response.ok ) { const templates = await response.json(); if ( templates.message ) { return dispatchNotification( templates.message ); } let items = templates; if ( additionalParams.isScroll ) { const library = select( 'tpc/beaver' ).getTemplates(); items = [ ...library.items, ...templates ]; } const totalPages = response.headers.get( 'x-wp-totalpages' ); const currentPage = params.page; dispatch( 'tpc/beaver' ).updateTemplates( items, currentPage, totalPages ); } } catch ( error ) { if ( error.message ) { dispatchNotification( error.message ); } } }; export const fetchLibrary = async ( additionalParams = {} ) => { const params = { per_page: 20, page: 0, ...omit( additionalParams, 'isScroll' ), }; const url = stringifyUrl( { url: window.tiTpc.endpoint + 'templates', query: { cache: localStorage.getItem( 'tpcCacheBuster' ), ...window.tiTpc.params, ...params, }, } ); try { setFetching( true ); const response = await apiFetch( { url, method: 'GET', parse: false, } ); setFetching( false ); if ( response.ok ) { const templates = await response.json(); if ( templates.message ) { return dispatchNotification( templates.message ); } let items = templates; if ( additionalParams.isScroll ) { const library = select( 'tpc/beaver' ).getLibrary(); items = [ ...library.items, ...templates ]; } const totalPages = response.headers.get( 'x-wp-totalpages' ); const currentPage = params.page; dispatch( 'tpc/beaver' ).updateLibrary( items, currentPage, totalPages ); } } catch ( error ) { if ( error.message ) { dispatchNotification( error.message ); } } }; export const importTemplate = async ( template ) => { const url = stringifyUrl( { url: `${ window.tiTpc.endpoint }templates/${ template }/import`, query: { cache: localStorage.getItem( 'tpcCacheBuster' ), ...window.tiTpc.params, }, } ); let content = {}; try { const response = await apiFetch( { url, method: 'GET', parse: false, } ); if ( response.ok ) { content = await response.json(); if ( content.message ) { return dispatchNotification( content.message ); } } } catch ( error ) { if ( error.message ) { dispatchNotification( error.message ); } } return content; }; export const updateTemplate = async ( params ) => { const url = stringifyUrl( { url: `${ window.tiTpc.endpoint }templates/${ params.template_id }`, query: { cache: localStorage.getItem( 'tpcCacheBuster' ), ...window.tiTpc.params, ...params, }, } ); try { const response = await apiFetch( { url, method: 'POST', parse: false, } ); if ( response.ok ) { const content = await response.json(); if ( content.message ) { return dispatchNotification( content.message ); } } localStorage.setItem( 'tpcCacheBuster', uuidv4() ); await fetchLibrary(); } catch ( error ) { if ( error.message ) { dispatchNotification( error.message ); } } }; export const deleteTemplate = async ( template ) => { const url = stringifyUrl( { url: `${ window.tiTpc.endpoint }templates/${ template }`, query: { cache: localStorage.getItem( 'tpcCacheBuster' ), _method: 'DELETE', ...window.tiTpc.params, }, } ); try { const response = await apiFetch( { url, method: 'POST' } ); if ( response.ok ) { const content = await response.json(); if ( content.message ) { return dispatchNotification( content.message ); } } localStorage.setItem( 'tpcCacheBuster', uuidv4() ); await fetchLibrary(); } catch ( error ) { if ( error.message ) { dispatchNotification( error.message ); } } }; Privacy Policy - We Ummat

Privacy Policy

Information We Collect

At Weummat Mission, we prioritize your privacy and only collect minimal, non-personal information to improve your experience with our platform. This information is used solely to enhance the functionality and features of our services. Rest assured, the information we collect is neither stored on our servers nor shared or sold to any third parties.

General Information and Permissions

  • We do not collect any personal information from users. Permissions granted by users are used strictly to improve the features of the website and enhance user experience.
  • Location data is collected to provide accurate Qibla direction, prayer times, and other Islamic information based on your geographical location.
  • We send one daily notification containing the Ayat of the Day, and additional prayer time notifications if enabled by the user in their settings.
  • Media storage permissions (such as access to your photo gallery) are required for downloading Quran translations and for sharing prayer times, Duas, Ayats, and gallery images with others.
  • Device information is collected to help us better understand and address any crashes or technical issues experienced by users.
  • Device identifiers are required for sending push notifications, and we collect this information to enable such features.

Note: None of the above information is stored on our servers.

Disclaimers

  • All Quranic translations are manually composed, and human error may occur. If any errors are reported, we will correct them as quickly as possible.
  • Prayer timings are based on your location and may differ slightly from those of your local Masjid. In case of discrepancies, it is recommended to follow your local Masjid’s timings.
  • Halal places listed in the app are sourced through the Google Places API, which relies on user-generated data. While we strive for accuracy, users should verify the authenticity of halal places themselves before visiting.
All Rights Reserved 2023.
Proudly powered by WordPress | Theme: Falcha News by Candid Themes.