1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

refactored hooks directory

This commit is contained in:
Fedor Katurov 2022-01-02 18:17:09 +07:00
parent efa3ba902d
commit f76a5a4798
106 changed files with 122 additions and 144 deletions

View file

@ -3,7 +3,7 @@ import { INodeComponentProps } from '~/redux/node/constants';
import styles from './styles.module.scss';
import { Markdown } from '~/components/containers/Markdown';
import { formatText } from '~/utils/dom';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { Paragraph } from '~/components/placeholders/Paragraph';
const LabDescription: FC<INodeComponentProps> = ({ node, isLoading }) => {

View file

@ -9,8 +9,8 @@ import 'swiper/components/zoom/zoom.scss';
import 'swiper/components/navigation/navigation.scss';
import styles from './styles.module.scss';
import { useNodeImages } from '~/utils/hooks/node/useNodeImages';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { useNodeImages } from '~/hooks/node/useNodeImages';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { Placeholder } from '~/components/placeholders/Placeholder';
import { normalizeBrightColor } from '~/utils/color';
import { ImagePreloader } from '~/components/media/ImagePreloader';

View file

@ -1,7 +1,7 @@
import React, { FC } from 'react';
import styles from './styles.module.scss';
import { INodeComponentProps } from '~/redux/node/constants';
import { useColorGradientFromString } from '~/utils/hooks/useColorGradientFromString';
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
interface Props extends INodeComponentProps {}

View file

@ -1,11 +1,11 @@
import React, { FC, useMemo } from 'react';
import { INode } from '~/redux/types';
import { useNodeBlocks } from '~/utils/hooks/node/useNodeBlocks';
import { useNodeBlocks } from '~/hooks/node/useNodeBlocks';
import styles from './styles.module.scss';
import { LabBottomPanel } from '~/components/lab/LabBottomPanel';
import { isAfter, parseISO } from 'date-fns';
import classNames from 'classnames';
import { useColorGradientFromString } from '~/utils/hooks/useColorGradientFromString';
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
interface IProps {
node: INode;

View file

@ -4,7 +4,7 @@ import styles from './styles.module.scss';
import { Group } from '~/components/containers/Group';
import { Icon } from '~/components/input/Icon';
import Tippy from '@tippy.js/react';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { INodeComponentProps } from '~/redux/node/constants';
import { Placeholder } from '~/components/placeholders/Placeholder';

View file

@ -1,7 +1,7 @@
import React, { FC } from 'react';
import styles from './styles.module.scss';
import { INodeComponentProps } from '~/redux/node/constants';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { useGotoNode } from '~/hooks/node/useGotoNode';
const LabPad: FC<INodeComponentProps> = ({ node }) => {
const onClick = useGotoNode(node.id);

View file

@ -4,7 +4,7 @@ import { INodeComponentProps } from '~/redux/node/constants';
import { formatTextParagraphs } from '~/utils/dom';
import { path } from 'ramda';
import styles from './styles.module.scss';
import { useGotoNode } from '~/utils/hooks/node/useGotoNode';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { Paragraph } from '~/components/placeholders/Paragraph';
const LabText: FC<INodeComponentProps> = ({ node, isLoading }) => {