1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Move vadliadtions and forisUrls to utils.

This commit is contained in:
Bogdan Bodnar 2020-03-13 20:56:33 +01:00
parent 3c7a67783f
commit 02b5583712
No known key found for this signature in database
GPG Key ID: 49E4169AD3CA42B0
8 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ import {
useCallback, useEffect, useReducer, useState,
} from "react";
import { ForisURLs } from "../forisUrls";
import { ForisURLs } from "../utils/forisUrls";
import {
API_ACTIONS, API_METHODS, API_STATE, getErrorPayload, HEADERS, TIMEOUT,
} from "./utils";

View File

@ -10,7 +10,7 @@ import PropTypes from "prop-types";
import { useAPIPost } from "../api/hooks";
import { API_STATE } from "../api/utils";
import { ForisURLs } from "../forisUrls";
import { ForisURLs } from "../utils/forisUrls";
import { Button } from "../bootstrap/Button";
import {

View File

@ -9,7 +9,7 @@ import React, { useState } from "react";
import QRCode from "qrcode.react";
import PropTypes from "prop-types";
import { ForisURLs } from "../../forisUrls";
import { ForisURLs } from "../../utils/forisUrls";
import { Button } from "../../bootstrap/Button";
import {
Modal, ModalBody, ModalFooter, ModalHeader,

View File

@ -12,7 +12,7 @@ import {
validateIPv6Address,
validateIPv6Prefix,
validateMAC,
} from "validations";
} from "utils/validations";
describe("Validation functions", () => {
it("validateIPv4Address valid", () => {

View File

@ -67,7 +67,7 @@ export { useClickOutside } from "./utils/hooks";
export { toLocaleDateString } from "./utils/datetime";
// Foris URL
export { ForisURLs, REFORIS_URL_PREFIX } from "./forisUrls";
export { ForisURLs, REFORIS_URL_PREFIX } from "./utils/forisUrls";
// Validation
export {
@ -78,7 +78,7 @@ export {
validateDUID,
validateMAC,
validateMultipleEmails,
} from "./validations";
} from "./utils/validations";
// Alert context
export { AlertContextProvider, useAlert } from "./alertContext/AlertContext";

View File

@ -7,7 +7,7 @@
/* eslint no-console: "off" */
import { ForisURLs } from "../forisUrls";
import { ForisURLs } from "../utils/forisUrls";
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";