mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-25 00:11:36 +01:00
Move vadliadtions and forisUrls to utils.
This commit is contained in:
parent
3c7a67783f
commit
02b5583712
|
@ -9,7 +9,7 @@ import {
|
||||||
useCallback, useEffect, useReducer, useState,
|
useCallback, useEffect, useReducer, useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
|
|
||||||
import { ForisURLs } from "../forisUrls";
|
import { ForisURLs } from "../utils/forisUrls";
|
||||||
import {
|
import {
|
||||||
API_ACTIONS, API_METHODS, API_STATE, getErrorPayload, HEADERS, TIMEOUT,
|
API_ACTIONS, API_METHODS, API_STATE, getErrorPayload, HEADERS, TIMEOUT,
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
|
|
|
@ -10,7 +10,7 @@ import PropTypes from "prop-types";
|
||||||
|
|
||||||
import { useAPIPost } from "../api/hooks";
|
import { useAPIPost } from "../api/hooks";
|
||||||
import { API_STATE } from "../api/utils";
|
import { API_STATE } from "../api/utils";
|
||||||
import { ForisURLs } from "../forisUrls";
|
import { ForisURLs } from "../utils/forisUrls";
|
||||||
|
|
||||||
import { Button } from "../bootstrap/Button";
|
import { Button } from "../bootstrap/Button";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import React, { useState } from "react";
|
||||||
import QRCode from "qrcode.react";
|
import QRCode from "qrcode.react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import { ForisURLs } from "../../forisUrls";
|
import { ForisURLs } from "../../utils/forisUrls";
|
||||||
import { Button } from "../../bootstrap/Button";
|
import { Button } from "../../bootstrap/Button";
|
||||||
import {
|
import {
|
||||||
Modal, ModalBody, ModalFooter, ModalHeader,
|
Modal, ModalBody, ModalFooter, ModalHeader,
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
validateIPv6Address,
|
validateIPv6Address,
|
||||||
validateIPv6Prefix,
|
validateIPv6Prefix,
|
||||||
validateMAC,
|
validateMAC,
|
||||||
} from "validations";
|
} from "utils/validations";
|
||||||
|
|
||||||
describe("Validation functions", () => {
|
describe("Validation functions", () => {
|
||||||
it("validateIPv4Address valid", () => {
|
it("validateIPv4Address valid", () => {
|
||||||
|
|
|
@ -67,7 +67,7 @@ export { useClickOutside } from "./utils/hooks";
|
||||||
export { toLocaleDateString } from "./utils/datetime";
|
export { toLocaleDateString } from "./utils/datetime";
|
||||||
|
|
||||||
// Foris URL
|
// Foris URL
|
||||||
export { ForisURLs, REFORIS_URL_PREFIX } from "./forisUrls";
|
export { ForisURLs, REFORIS_URL_PREFIX } from "./utils/forisUrls";
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
export {
|
export {
|
||||||
|
@ -78,7 +78,7 @@ export {
|
||||||
validateDUID,
|
validateDUID,
|
||||||
validateMAC,
|
validateMAC,
|
||||||
validateMultipleEmails,
|
validateMultipleEmails,
|
||||||
} from "./validations";
|
} from "./utils/validations";
|
||||||
|
|
||||||
// Alert context
|
// Alert context
|
||||||
export { AlertContextProvider, useAlert } from "./alertContext/AlertContext";
|
export { AlertContextProvider, useAlert } from "./alertContext/AlertContext";
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
/* eslint no-console: "off" */
|
/* eslint no-console: "off" */
|
||||||
|
|
||||||
import { ForisURLs } from "../forisUrls";
|
import { ForisURLs } from "../utils/forisUrls";
|
||||||
|
|
||||||
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
|
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user