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 ); } } }; About Us - We Ummat

About Us

Welcome to We Ummat – Your Trusted Islamic Search Engine!

At We Ummat, we are dedicated to making Islamic knowledge accessible to everyone. Our mission is to provide easy access to accurate and reliable information on Islam, the Quran, Hadith, and much more. Whether you’re a Muslim seeking deeper understanding or a non-Muslim looking to learn, our platform serves as your go-to resource. With carefully curated content, We Ummat is here to support your quest for knowledge.

Why Choose We Ummat?

We Ummat stands out by prioritizing trustworthiness and accuracy. In an era where misinformation can spread easily, we believe it’s essential to offer content that is both authentic and well-researched. Our dedicated team works diligently to verify every piece of information before it’s published. We source our content from credible Islamic scholars and ensure that everything aligns with authentic teachings. By choosing We Ummat, you’re choosing a platform you can trust for reliable Islamic knowledge.

Engage with Experts

We understand that learning about Islam goes beyond simply reading articles. That’s why we offer an interactive forum where users can engage directly with Islamic scholars and experts. Whether you have questions about Islamic rulings, are looking for advice on personal matters, or wish to gain a deeper understanding of specific teachings, our forum allows you to connect with knowledgeable individuals. Join the discussions, ask questions, and participate in meaningful conversations that help you grow in your knowledge.

Join Our Global Islamic Network

We Ummat is more than just a search engine; it’s a global community. Our platform connects people from all walks of life who share a common interest in Islam. Whether you’re in the Middle East, Europe, Africa, Asia, or anywhere else, We Ummat offers a space for individuals to unite, share ideas, and support each other in their journey of Islamic learning. We believe in fostering a strong, connected Ummah that transcends geographical boundaries, allowing everyone to benefit from collective wisdom and understanding.

Explore and Discover

Our powerful and intuitive search engine makes discovering Islamic content simple and efficient. Whether you’re searching for specific Quranic verses, explanations of Hadith, or detailed articles on Islamic jurisprudence, We Ummat ensures you find what you’re looking for with ease. Our platform is designed to be user-friendly, allowing you to navigate and explore the vast wealth of Islamic knowledge effortlessly. Begin your journey of discovery today and enrich your understanding of Islam through well-researched, authentic resources.

Join Us on This Enriching Expedition

We invite you to embark on an enriching journey with We Ummat. Whether you’re a student of Islam, a lifelong learner, or someone curious about Islamic teachings, we are here to guide you. Our platform is built with the aim of making Islamic knowledge accessible and understandable for everyone. Join us today and become part of a community that values truth, knowledge, and connection.


Transform your quest for knowledge with We Ummat. Dive into the depths of Islamic teachings with confidence, knowing you are accessing well-researched and authentic information. Welcome to a community dedicated to truth, learning, and connection.

All Rights Reserved 2023.
Proudly powered by WordPress | Theme: Falcha News by Candid Themes.