1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-24 00:01:36 +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, 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";

View File

@ -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 {

View File

@ -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,

View File

@ -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", () => {

View File

@ -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";

View File

@ -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";