mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-04 00:56:40 +07:00
removed redux completely
This commit is contained in:
parent
26e6d8d41b
commit
a4bb07e9cf
323 changed files with 2464 additions and 3348 deletions
src/components/comment
|
@ -1,11 +1,11 @@
|
|||
import React, { FC, HTMLAttributes, memo } from "react";
|
||||
import { CommentWrapper } from "~/components/containers/CommentWrapper";
|
||||
import { IComment, ICommentGroup, IFile } from "~/redux/types";
|
||||
import { CommentContent } from "~/components/comment/CommentContent";
|
||||
import styles from "./styles.module.scss";
|
||||
import { CommendDeleted } from "../../node/CommendDeleted";
|
||||
import classNames from "classnames";
|
||||
import { NEW_COMMENT_CLASSNAME } from "~/constants/comment";
|
||||
import React, { FC, HTMLAttributes, memo } from 'react';
|
||||
import { CommentWrapper } from '~/components/containers/CommentWrapper';
|
||||
import { IComment, ICommentGroup, IFile } from '~/types';
|
||||
import { CommentContent } from '~/components/comment/CommentContent';
|
||||
import styles from './styles.module.scss';
|
||||
import { CommendDeleted } from '../../node/CommendDeleted';
|
||||
import classNames from 'classnames';
|
||||
import { NEW_COMMENT_CLASSNAME } from '~/constants/comment';
|
||||
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
nodeId: number;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import React, { FC, useCallback, useState } from "react";
|
||||
import { IUser } from "~/redux/auth/types";
|
||||
import { Avatar } from "~/components/common/Avatar";
|
||||
import { path } from "ramda";
|
||||
import { Manager, Popper, Reference } from "react-popper";
|
||||
import styles from "./styles.module.scss";
|
||||
import { useRandomPhrase } from "~/constants/phrases";
|
||||
import React, { FC, useCallback, useState } from 'react';
|
||||
import { IUser } from '~/types/auth';
|
||||
import { Avatar } from '~/components/common/Avatar';
|
||||
import { path } from 'ramda';
|
||||
import { Manager, Popper, Reference } from 'react-popper';
|
||||
import styles from './styles.module.scss';
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
|
||||
interface Props {
|
||||
user: IUser;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import React, { createElement, FC, Fragment, memo, useCallback, useMemo, useState } from "react";
|
||||
import { IComment, IFile } from "~/redux/types";
|
||||
import { append, assocPath, path } from "ramda";
|
||||
import { formatCommentText, getPrettyDate, getURL } from "~/utils/dom";
|
||||
import { Group } from "~/components/containers/Group";
|
||||
import styles from "./styles.module.scss";
|
||||
import { UploadType } from "~/constants/uploads";
|
||||
import reduce from "ramda/es/reduce";
|
||||
import { AudioPlayer } from "~/components/media/AudioPlayer";
|
||||
import classnames from "classnames";
|
||||
import classNames from "classnames";
|
||||
import { PRESETS } from "~/constants/urls";
|
||||
import { COMMENT_BLOCK_RENDERERS } from "~/constants/comment";
|
||||
import { CommentMenu } from "../CommentMenu";
|
||||
import { CommentForm } from "~/components/comment/CommentForm";
|
||||
import React, { createElement, FC, Fragment, memo, useCallback, useMemo, useState } from 'react';
|
||||
import { IComment, IFile } from '~/types';
|
||||
import { append, assocPath, path } from 'ramda';
|
||||
import { formatCommentText, getPrettyDate, getURL } from '~/utils/dom';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import styles from './styles.module.scss';
|
||||
import { UploadType } from '~/constants/uploads';
|
||||
import reduce from 'ramda/es/reduce';
|
||||
import { AudioPlayer } from '~/components/media/AudioPlayer';
|
||||
import classnames from 'classnames';
|
||||
import classNames from 'classnames';
|
||||
import { PRESETS } from '~/constants/urls';
|
||||
import { COMMENT_BLOCK_RENDERERS } from '~/constants/comment';
|
||||
import { CommentMenu } from '../CommentMenu';
|
||||
import { CommentForm } from '~/components/comment/CommentForm';
|
||||
|
||||
interface IProps {
|
||||
nodeId: number;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React, { FC, memo, useMemo } from "react";
|
||||
import { ICommentBlockProps } from "~/constants/comment";
|
||||
import styles from "./styles.module.scss";
|
||||
import { getYoutubeThumb } from "~/utils/dom";
|
||||
import { Icon } from "~/components/input/Icon";
|
||||
import { useYoutubeMetadata } from "~/hooks/metadata/useYoutubeMetadata";
|
||||
import React, { FC, memo, useMemo } from 'react';
|
||||
import { ICommentBlockProps } from '~/constants/comment';
|
||||
import styles from './styles.module.scss';
|
||||
import { getYoutubeThumb } from '~/utils/dom';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import { useYoutubeMetadata } from '~/hooks/metadata/useYoutubeMetadata';
|
||||
|
||||
type Props = ICommentBlockProps & {};
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
import React, { FC, useCallback, useState } from "react";
|
||||
import { useCommentFormFormik } from "~/hooks/comments/useCommentFormFormik";
|
||||
import { FormikProvider } from "formik";
|
||||
import { LocalCommentFormTextarea } from "~/components/comment/LocalCommentFormTextarea";
|
||||
import { Button } from "~/components/input/Button";
|
||||
import { UploadSubject, UploadTarget } from "~/constants/uploads";
|
||||
import { CommentFormAttachButtons } from "~/components/comment/CommentFormAttachButtons";
|
||||
import { CommentFormFormatButtons } from "~/components/comment/CommentFormFormatButtons";
|
||||
import { CommentFormAttaches } from "~/components/comment/CommentFormAttaches";
|
||||
import { LoaderCircle } from "~/components/input/LoaderCircle";
|
||||
import { IComment, INode } from "~/redux/types";
|
||||
import { EMPTY_COMMENT } from "~/constants/node";
|
||||
import { UploadDropzone } from "~/components/upload/UploadDropzone";
|
||||
import styles from "./styles.module.scss";
|
||||
import { ERROR_LITERAL } from "~/constants/errors";
|
||||
import { useInputPasteUpload } from "~/hooks/dom/useInputPasteUpload";
|
||||
import { Filler } from "~/components/containers/Filler";
|
||||
import { useUploader } from "~/hooks/data/useUploader";
|
||||
import { UploaderContextProvider } from "~/utils/context/UploaderContextProvider";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import React, { FC, useCallback, useState } from 'react';
|
||||
import { useCommentFormFormik } from '~/hooks/comments/useCommentFormFormik';
|
||||
import { FormikProvider } from 'formik';
|
||||
import { LocalCommentFormTextarea } from '~/components/comment/LocalCommentFormTextarea';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { UploadSubject, UploadTarget } from '~/constants/uploads';
|
||||
import { CommentFormAttachButtons } from '~/components/comment/CommentFormAttachButtons';
|
||||
import { CommentFormFormatButtons } from '~/components/comment/CommentFormFormatButtons';
|
||||
import { CommentFormAttaches } from '~/components/comment/CommentFormAttaches';
|
||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
||||
import { IComment, INode } from '~/types';
|
||||
import { EMPTY_COMMENT } from '~/constants/node';
|
||||
import { UploadDropzone } from '~/components/upload/UploadDropzone';
|
||||
import styles from './styles.module.scss';
|
||||
import { ERROR_LITERAL } from '~/constants/errors';
|
||||
import { useInputPasteUpload } from '~/hooks/dom/useInputPasteUpload';
|
||||
import { Filler } from '~/components/containers/Filler';
|
||||
import { useUploader } from '~/hooks/data/useUploader';
|
||||
import { UploaderContextProvider } from '~/utils/context/UploaderContextProvider';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
||||
interface IProps {
|
||||
comment?: IComment;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { FC, useCallback } from "react";
|
||||
import { ButtonGroup } from "~/components/input/ButtonGroup";
|
||||
import { Button } from "~/components/input/Button";
|
||||
import { COMMENT_FILE_TYPES } from "~/constants/uploads";
|
||||
import React, { FC, useCallback } from 'react';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { COMMENT_FILE_TYPES } from '~/constants/uploads';
|
||||
|
||||
interface IProps {
|
||||
onUpload: (files: File[]) => void;
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { FC, useCallback } from 'react';
|
|||
import styles from './styles.module.scss';
|
||||
import { SortableImageGrid } from '~/components/editors/SortableImageGrid';
|
||||
import { SortableAudioGrid } from '~/components/editors/SortableAudioGrid';
|
||||
import { IFile } from '~/redux/types';
|
||||
import { IFile } from '~/types';
|
||||
import { SortEnd } from 'react-sortable-hoc';
|
||||
import { moveArrItem } from '~/utils/fn';
|
||||
import { useFileDropZone } from '~/hooks';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import React, { FC, useCallback, useEffect } from "react";
|
||||
import { ButtonGroup } from "~/components/input/ButtonGroup";
|
||||
import { Button } from "~/components/input/Button";
|
||||
import { useFormatWrapper, wrapTextInsideInput } from "~/hooks/dom/useFormatWrapper";
|
||||
import styles from "./styles.module.scss";
|
||||
import React, { FC, useCallback, useEffect } from 'react';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { useFormatWrapper, wrapTextInsideInput } from '~/hooks/dom/useFormatWrapper';
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps {
|
||||
element: HTMLTextAreaElement;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { FC, useCallback, useState } from "react";
|
||||
import styles from "./styles.module.scss";
|
||||
import React, { FC, useCallback, useState } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps {
|
||||
onEdit: () => void;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React, { FC, useMemo } from "react";
|
||||
import { ICommentBlockProps } from "~/constants/comment";
|
||||
import styles from "./styles.module.scss";
|
||||
import classNames from "classnames";
|
||||
import markdown from "~/styles/common/markdown.module.scss";
|
||||
import { formatText } from "~/utils/dom";
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { ICommentBlockProps } from '~/constants/comment';
|
||||
import styles from './styles.module.scss';
|
||||
import classNames from 'classnames';
|
||||
import markdown from '~/styles/common/markdown.module.scss';
|
||||
import { formatText } from '~/utils/dom';
|
||||
|
||||
interface IProps extends ICommentBlockProps {}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { forwardRef, KeyboardEventHandler, TextareaHTMLAttributes, useCallback } from "react";
|
||||
import { Textarea } from "~/components/input/Textarea";
|
||||
import { useCommentFormContext } from "~/hooks/comments/useCommentFormFormik";
|
||||
import { useRandomPhrase } from "~/constants/phrases";
|
||||
import React, { forwardRef, KeyboardEventHandler, TextareaHTMLAttributes, useCallback } from 'react';
|
||||
import { Textarea } from '~/components/input/Textarea';
|
||||
import { useCommentFormContext } from '~/hooks/comments/useCommentFormFormik';
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
|
||||
interface IProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
||||
isLoading?: boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue