From 58f9b60f0b6c3dab2589216ae065b1e38c2acf30 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 19 Jun 2020 17:47:54 +0200 Subject: [PATCH] 0.11.1 --- src/hooks/useRoyalnetInstanceValidator.js | 4 ++-- src/index.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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,