mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
refactor and restructure ui hooks
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
export * from './theme-hooks';
|
||||
export * from './useASNDetail';
|
||||
export * from './useBooleanValue';
|
||||
export * from './useDevice';
|
||||
export * from './useDirective';
|
||||
export * from './useDNSQuery';
|
||||
export * from './useFormState';
|
||||
export * from './useGreeting';
|
||||
export * from './useHyperglassConfig';
|
||||
export * from './useLGQuery';
|
||||
export * from './useOpposingColor';
|
||||
export * from './useStrf';
|
||||
export * from './useTableToString';
|
||||
export * from './useWtf';
|
||||
export * from './use-asn-detail';
|
||||
export * from './use-boolean-value';
|
||||
export * from './use-device';
|
||||
export * from './use-directive';
|
||||
export * from './use-dns-query';
|
||||
export * from './use-form-state';
|
||||
export * from './use-greeting';
|
||||
export * from './use-hyperglass-config';
|
||||
export * from './use-lg-query';
|
||||
export * from './use-opposing-color';
|
||||
export * from './use-strf';
|
||||
export * from './use-table-to-string';
|
||||
export * from './use-wtf';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useBooleanValue } from './useBooleanValue';
|
||||
import { useBooleanValue } from './use-boolean-value';
|
||||
|
||||
const VALUE_IF_TRUE = 'Is True';
|
||||
const VALUE_IF_FALSE = 'Is False';
|
||||
@@ -1,7 +1,6 @@
|
||||
import {} from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import { useDevice } from './useDevice';
|
||||
import { useDevice } from './use-device';
|
||||
import { HyperglassContext } from '~/context';
|
||||
|
||||
import type { DeviceGroup, Config } from '~/types';
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useFormState } from './useFormState';
|
||||
import { useFormState } from './use-form-state';
|
||||
|
||||
import type { Directive } from '~/types';
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { StateCreator } from 'zustand';
|
||||
import type { UseFormSetError, UseFormClearErrors } from 'react-hook-form';
|
||||
import type { SingleValue, MultiValue } from 'react-select';
|
||||
import type { SingleOption, Directive, FormData, Text, Device } from '~/types';
|
||||
import type { UseDeviceReturn } from './useDevice';
|
||||
import type { UseDeviceReturn } from './use-device';
|
||||
|
||||
type FormStatus = 'form' | 'results';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import '@testing-library/jest-dom';
|
||||
import { render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useGreeting } from './useGreeting';
|
||||
import { useGreeting } from './use-greeting';
|
||||
|
||||
const TRUE = JSON.stringify(true);
|
||||
const FALSE = JSON.stringify(false);
|
||||
@@ -2,7 +2,7 @@ import { render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { ChakraProvider, useColorMode, useColorModeValue, extendTheme } from '@chakra-ui/react';
|
||||
import { useOpposingColor } from './useOpposingColor';
|
||||
import { useOpposingColor } from './use-opposing-color';
|
||||
|
||||
const TestComponent = (): JSX.Element => {
|
||||
const { toggleColorMode } = useColorMode();
|
||||
@@ -1,6 +1,6 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import { useStrf } from './useStrf';
|
||||
import { useStrf } from './use-strf';
|
||||
|
||||
const TEMPLATE = 'Testing {name} hook';
|
||||
const OBJECT = { name: 'useStrf' };
|
||||
Reference in New Issue
Block a user