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:
parent
efa3ba902d
commit
f76a5a4798
106 changed files with 122 additions and 144 deletions
|
@ -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 }) => {
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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 {}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue