import { faCode, faDragon } from '@fortawesome/free-solid-svg-icons'; import type { Actions } from 'easy-peasy'; import { useStoreActions } from 'easy-peasy'; import { useEffect, useState } from 'react'; import tw from 'twin.macro'; import getNodeConfiguration from '@/api/admin/nodes/getNodeConfiguration'; import AdminBox from '@/components/admin/AdminBox'; import { Context } from '@/components/admin/nodes/NodeRouter'; import CopyOnClick from '@/components/elements/CopyOnClick'; import type { ApplicationStore } from '@/state'; export default () => { const { clearFlashes, clearAndAddHttpError } = useStoreActions( (actions: Actions) => actions.flashes, ); const [configuration, setConfiguration] = useState(''); const node = Context.useStoreState(state => state.node); if (node === undefined) { return <>; } useEffect(() => { clearFlashes('node'); getNodeConfiguration(node.id) .then(configuration => setConfiguration(configuration)) .catch(error => { console.error(error); clearAndAddHttpError({ key: 'node', error }); }); }, []); return ( <>
                        {configuration}
                    
Never™ ); };