mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
0.11.1
This commit is contained in:
parent
543dcedb40
commit
58f9b60f0b
2 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { useContext, useState } from 'preact/hooks';
|
import { useContext, useState } from 'preact/hooks';
|
||||||
import RoyalnetInstanceUrl from '../contexts/RoyalnetInstanceUrl';
|
import RoyalnetInstanceUrl from '../contexts/RoyalnetInstanceUrl';
|
||||||
import useFormValidator from "./useFormValidator";
|
import useFormValidator from "./useFormValidator";
|
||||||
import apiRequest from '../utils/apiRequest';
|
import {royalnetApiRequest} from '../utils/royalnetApiRequest';
|
||||||
|
|
||||||
const instanceUrlRegex = /^https?:\/\/.*?[^/]$/;
|
const instanceUrlRegex = /^https?:\/\/.*?[^/]$/;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ export default function() {
|
||||||
let abort = new AbortController();
|
let abort = new AbortController();
|
||||||
setInstanceTesterAbort(abort);
|
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) {
|
if(value === instanceUrl) {
|
||||||
setStatus({
|
setStatus({
|
||||||
validity: true,
|
validity: true,
|
||||||
|
|
|
@ -51,6 +51,9 @@ export {
|
||||||
LatexDefaultDisplay,
|
LatexDefaultDisplay,
|
||||||
LatexDefaultInline,
|
LatexDefaultInline,
|
||||||
LatexRenderColor,
|
LatexRenderColor,
|
||||||
|
useFormValidator,
|
||||||
|
useRoyalnetData,
|
||||||
|
useRoyalnetInstanceValidator,
|
||||||
theme,
|
theme,
|
||||||
stripTabs,
|
stripTabs,
|
||||||
royalnetApiRequest,
|
royalnetApiRequest,
|
||||||
|
|
Loading…
Reference in a new issue