whoami7 - Manager
:
/
home
/
analuakl
/
bents.in
/
wp-content
/
plugins
/
really-simple-ssl
/
settings
/
src
/
Settings
/
Host
/
Upload File:
files >> /home/analuakl/bents.in/wp-content/plugins/really-simple-ssl/settings/src/Settings/Host/HostData.js
import {create} from 'zustand'; import * as rsssl_api from "../../utils/api"; const useHostData = create(( set, get ) => ({ hosts: [], hostsLoaded:false, fetchHosts: async ( id ) => { try { const response = await rsssl_api.doAction('get_hosts', { id: id }); // Handle the response if ( !response ) { console.error('No response received from the server.'); return; } let hosts = response.hosts; // Set the roles state with formatted data set({hosts: hosts,hostsLoaded:true }); } catch (error) { console.error('Error:', error); } } })); export default useHostData;
Copyright ©2021 || Defacer Indonesia