File "useSiteImages.js"

Full path: /home/disqkgca/aqanet.org/wp-content/plugins/extendify/src/Launch/hooks/useSiteImages.js
File size: 439 B
MIME-type: text/x-java
Charset: utf-8

Download   Open   Back

import useSWRImmutable from 'swr/immutable';
import { getSiteImages } from '@launch/api/DataApi';
import { useSiteProfile } from '@launch/hooks/useSiteProfile';

export const useSiteImages = () => {
	const { loading, siteProfile } = useSiteProfile();
	const { data, error } = useSWRImmutable(
		loading ? null : { key: 'site-images', ...siteProfile },
		getSiteImages,
	);
	return { siteImages: data, error, loading: !data && !error };
};

PHP File Manager