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

fixed ramda imports to reduce bundle size

This commit is contained in:
Fedor Katurov 2022-01-25 11:24:42 +07:00
parent a497912049
commit 097b091abd
47 changed files with 208 additions and 91 deletions

View file

@ -1,11 +1,10 @@
import React, { useCallback, VFC } from 'react';
import { path } from 'ramda';
import { Icon } from '~/components/input/Icon';
import { PlayerState } from '~/constants/player';
import { IFile } from '~/types';
import { PlayerProgress } from '~/types/player';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,11 +1,11 @@
import React, { FC, useCallback, useState } from 'react';
import { path } from 'ramda';
import { Manager, Popper, Reference } from 'react-popper';
import { Avatar } from '~/components/common/Avatar';
import { useRandomPhrase } from '~/constants/phrases';
import { IUser } from '~/types/auth';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -2,8 +2,6 @@ import React, { createElement, FC, Fragment, memo, useCallback, useMemo, useStat
import classnames from 'classnames';
import classNames from 'classnames';
import { append, assocPath, path } from 'ramda';
import reduce from 'ramda/es/reduce';
import { CommentForm } from '~/components/comment/CommentForm';
import { Group } from '~/components/containers/Group';
@ -13,14 +11,12 @@ import { UploadType } from '~/constants/uploads';
import { PRESETS } from '~/constants/urls';
import { IComment, IFile } from '~/types';
import { formatCommentText, getPrettyDate, getURL } from '~/utils/dom';
import { append, assocPath, path, reduce } from '~/utils/ramda';
import { CommentMenu } from '../CommentMenu';
import styles from './styles.module.scss';
interface IProps {
nodeId: number;
comment: IComment;

View file

@ -1,10 +1,10 @@
import React, { FC } from 'react';
import classNames from 'classnames';
import { path } from 'ramda';
import { CommentAvatar } from '~/components/comment/CommentAvatar';
import { IUser } from '~/types/auth';
import { path } from '~/utils/ramda';
import { DivProps } from '~/utils/types';
import styles from './styles.module.scss';

View file

@ -1,7 +1,5 @@
import React, { FC, useCallback, useMemo } from 'react';
import { values } from 'ramda';
import { UploadDropzone } from '~/components/upload/UploadDropzone';
import { UploadType } from '~/constants/uploads';
import { useNodeAudios } from '~/hooks/node/useNodeAudios';
@ -9,13 +7,13 @@ import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { useNodeImages } from '~/hooks/node/useNodeImages';
import { NodeEditorProps } from '~/types/node';
import { useUploaderContext } from '~/utils/context/UploaderContextProvider';
import { values } from '~/utils/ramda';
import { AudioGrid } from '../AudioGrid';
import { ImageGrid } from '../ImageGrid';
import styles from './styles.module.scss';
type IProps = NodeEditorProps;
const AudioEditor: FC<IProps> = () => {

View file

@ -1,9 +1,8 @@
import React, { createElement, FC } from 'react';
import { has } from 'ramda';
import { NODE_PANEL_COMPONENTS } from '~/constants/node';
import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { has } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,11 +1,10 @@
import React, { FC } from 'react';
import { values } from 'ramda';
import { ImageGrid } from '~/components/editors/ImageGrid';
import { UploadDropzone } from '~/components/upload/UploadDropzone';
import { NodeEditorProps } from '~/types/node';
import { useUploaderContext } from '~/utils/context/UploaderContextProvider';
import { values } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,11 +1,10 @@
import React, { FC, useCallback } from 'react';
import { path } from 'ramda';
import { Textarea } from '~/components/input/Textarea';
import { useRandomPhrase } from '~/constants/phrases';
import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { NodeEditorProps } from '~/types/node';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,12 +1,12 @@
import React, { FC, useCallback, useMemo } from 'react';
import classnames from 'classnames';
import { path } from 'ramda';
import { InputText } from '~/components/input/InputText';
import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { NodeEditorProps } from '~/types/node';
import { getYoutubeThumb } from '~/utils/dom';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,16 +1,14 @@
import React, { FC, useMemo } from 'react';
import { path } from 'ramda';
import { Markdown } from '~/components/containers/Markdown';
import { Paragraph } from '~/components/placeholders/Paragraph';
import { INodeComponentProps } from '~/constants/node';
import { useGotoNode } from '~/hooks/node/useGotoNode';
import { formatTextParagraphs } from '~/utils/dom';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';
const LabText: FC<INodeComponentProps> = ({ node, isLoading }) => {
const content = useMemo(() => formatTextParagraphs(path(['blocks', 0, 'text'], node) || ''), [
node,

View file

@ -1,11 +1,10 @@
import React, { FC } from 'react';
import { path } from 'ramda';
import { INodeComponentProps } from '~/constants/node';
import { PRESETS } from '~/constants/urls';
import { useNodeImages } from '~/hooks/node/useNodeImages';
import { getURL } from '~/utils/dom';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,15 +1,14 @@
import React, { FC, memo } from 'react';
import classNames from 'classnames';
import range from 'ramda/es/range';
import { Group } from '~/components/containers/Group';
import cell_style from '~/components/node/NodeRelatedItem/styles.module.scss';
import { Placeholder } from '~/components/placeholders/Placeholder';
import { range } from '~/utils/ramda';
import styles from './styles.module.scss';
interface IProps {}
const NodeRelatedPlaceholder: FC<IProps> = memo(() => {

View file

@ -1,15 +1,14 @@
import React, { FC, useMemo } from 'react';
import classNames from 'classnames';
import { path } from 'ramda';
import { INodeComponentProps } from '~/constants/node';
import markdown from '~/styles/common/markdown.module.scss';
import { formatTextParagraphs } from '~/utils/dom';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';
interface IProps extends INodeComponentProps {}
const NodeTextBlock: FC<IProps> = ({ node }) => {

View file

@ -1,8 +1,7 @@
import React, { FC, useMemo } from 'react';
import { path } from 'ramda';
import { INodeComponentProps } from '~/constants/node';
import { path } from '~/utils/ramda';
import styles from './styles.module.scss';

View file

@ -1,7 +1,6 @@
import React, { FC } from 'react';
import classNames from 'classnames';
import { has } from 'ramda';
import { Filler } from '~/components/containers/Filler';
import { Group } from '~/components/containers/Group';
@ -13,7 +12,7 @@ import { ProfileAccounts } from '~/containers/profile/ProfileAccounts';
import { usePatchUser } from '~/hooks/auth/usePatchUser';
import { useUser } from '~/hooks/auth/useUser';
import { useProfileForm } from '~/hooks/profile/useProfileForm';
import { has } from '~/utils/ramda';
import styles from './styles.module.scss';