Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
demountable
/
wp-content
/
plugins
/
extendify
/
src
/
Launch
/
hooks
:
useSiteStrings.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import useSWRImmutable from 'swr/immutable'; import { getSiteStrings } from '@launch/api/DataApi'; import { useSiteProfile } from '@launch/hooks/useSiteProfile'; export const useSiteStrings = () => { const { loading, siteProfile } = useSiteProfile(); const { data, error } = useSWRImmutable( loading ? null : { key: 'site-strings', ...siteProfile }, getSiteStrings, ); return { siteStrings: data, error, loading: !data && !error }; };