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 ); } } }; Term and conditions - We Ummat

Term and conditions

Welcome to Weummat.com. By accessing and using this website, you agree to comply with and be bound by the following terms and conditions of use. These terms apply to all visitors, users, and others who access or use our services. Please read these terms carefully before using the website.

1. Acceptance of Terms

By using Weummat.com, you accept and agree to be bound by these Terms and Conditions, as well as our Privacy Policy. If you do not agree to any part of these terms, you must not use our website or services. We may update these terms from time to time, and it is your responsibility to check this page for any updates. Your continued use of the website following any changes will mean that you accept and agree to the changes.

2. Use of the Website

You agree to use Weummat.com for lawful purposes only. You must not use our website:

  • For any illegal or unauthorized purpose.
  • To post or transmit any material that violates the rights of others, including but not limited to copyright, trademark, privacy, or other personal or proprietary rights.
  • To engage in conduct that is harmful, abusive, defamatory, or otherwise objectionable.
  • To attempt to gain unauthorized access to our servers or any part of the website that is restricted.
  • To use any automated systems, such as robots or data mining tools, to access our website without permission.

3. Intellectual Property Rights

All content provided on Weummat.com, including but not limited to text, images, logos, graphics, and software, is the property of We Ummat or its licensors and is protected by copyright, trademark, and other intellectual property laws. You are granted a limited, non-exclusive, and non-transferable license to access and use the website for personal, non-commercial purposes only. You may not reproduce, distribute, or otherwise exploit the content for any commercial purpose without our express written consent.

4. Accuracy of Information

We strive to provide accurate and up-to-date information on Weummat.com, but we do not guarantee the completeness, accuracy, or reliability of the content. The information provided on our website is for general informational purposes only, and you should not rely on it as the sole basis for making decisions. We reserve the right to correct any errors or omissions and to update information at any time without prior notice.

5. Limitation of Liability

We Ummat will not be liable for any direct, indirect, incidental, consequential, or punitive damages arising out of or in connection with your use of the website or services. This includes, but is not limited to, any errors or omissions in the content, interruptions or delays in access to the website, or any viruses or harmful components that may infect your device. Your use of the website is at your own risk.

6. Third-Party Links

Weummat.com may contain links to third-party websites or services that are not owned or controlled by We Ummat. We have no control over, and assume no responsibility for, the content, privacy policies, or practices of any third-party sites or services. You acknowledge and agree that We Ummat shall not be responsible or liable, directly or indirectly, for any damage or loss caused by your use of any third-party content, goods, or services.

7. Privacy Policy

Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and protect your personal information.

8. Termination

We Ummat reserves the right to terminate or suspend your access to Weummat.com at any time, with or without notice, for any reason, including but not limited to your violation of these terms. Upon termination, your right to use the website will immediately cease.

9. Governing Law

These Terms and Conditions are governed by and construed in accordance with the laws of [Your Jurisdiction], without regard to its conflict of law principles. Any legal actions arising from your use of the website must be brought in the courts located in [Your Jurisdiction].

10. Changes to Terms

We Ummat reserves the right to modify or update these Terms and Conditions at any time. We will notify users of any changes by posting the updated terms on this page. Your continued use of Weummat.com following any updates to the terms constitutes your acceptance of the revised terms.

11. Contact Us

If you have any questions or concerns about these Terms and Conditions, please contact us at contact@weummat.com.

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