diff --git a/src/hooks/useRoyalnetInstanceValidator.js b/src/hooks/useRoyalnetInstanceValidator.js index af03822..4d948e0 100644 --- a/src/hooks/useRoyalnetInstanceValidator.js +++ b/src/hooks/useRoyalnetInstanceValidator.js @@ -1,7 +1,7 @@ import { useContext, useState } from 'preact/hooks'; import RoyalnetInstanceUrl from '../contexts/RoyalnetInstanceUrl'; import useFormValidator from "./useFormValidator"; -import apiRequest from '../utils/apiRequest'; +import {royalnetApiRequest} from '../utils/royalnetApiRequest'; const instanceUrlRegex = /^https?:\/\/.*?[^/]$/; @@ -33,7 +33,7 @@ export default function() { let abort = new AbortController(); setInstanceTesterAbort(abort); - apiRequest(value, "GET", "/api/royalnet/version/v1", undefined, abort.signal).then((data) => { + royalnetApiRequest(value, "GET", "/api/royalnet/version/v1", undefined, abort.signal).then((data) => { if(value === instanceUrl) { setStatus({ validity: true, diff --git a/src/index.js b/src/index.js index 42b41cd..4233b8c 100644 --- a/src/index.js +++ b/src/index.js @@ -51,6 +51,9 @@ export { LatexDefaultDisplay, LatexDefaultInline, LatexRenderColor, + useFormValidator, + useRoyalnetData, + useRoyalnetInstanceValidator, theme, stripTabs, royalnetApiRequest,