mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
(nextjs) added eslint and import sorting
This commit is contained in:
parent
e5f8d5a551
commit
0838bf7ee6
330 changed files with 1576 additions and 896 deletions
|
@ -1,11 +1,18 @@
|
|||
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 { CommentContent } from '~/components/comment/CommentContent';
|
||||
import { CommentWrapper } from '~/components/containers/CommentWrapper';
|
||||
import { NEW_COMMENT_CLASSNAME } from '~/constants/comment';
|
||||
import { IComment, ICommentGroup, IFile } from '~/types';
|
||||
|
||||
import { CommendDeleted } from '../../node/CommendDeleted';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
|
||||
|
||||
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
nodeId: number;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
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 { Avatar } from '~/components/common/Avatar';
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
import { IUser } from '~/types/auth';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface Props {
|
||||
user: IUser;
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
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 { append, assocPath, path } from 'ramda';
|
||||
import reduce from 'ramda/es/reduce';
|
||||
|
||||
import { CommentForm } from '~/components/comment/CommentForm';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { AudioPlayer } from '~/components/media/AudioPlayer';
|
||||
import { COMMENT_BLOCK_RENDERERS } from '~/constants/comment';
|
||||
import { UploadType } from '~/constants/uploads';
|
||||
import { PRESETS } from '~/constants/urls';
|
||||
import { IComment, IFile } from '~/types';
|
||||
import { formatCommentText, getPrettyDate, getURL } from '~/utils/dom';
|
||||
|
||||
import { CommentMenu } from '../CommentMenu';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
|
||||
|
||||
|
||||
interface IProps {
|
||||
nodeId: number;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
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 { ICommentBlockProps } from '~/constants/comment';
|
||||
import { useYoutubeMetadata } from '~/hooks/metadata/useYoutubeMetadata';
|
||||
import { getYoutubeThumb } from '~/utils/dom';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
|
||||
type Props = ICommentBlockProps & {};
|
||||
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
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';
|
||||
|
||||
import { CommentFormAttachButtons } from '~/components/comment/CommentFormAttachButtons';
|
||||
import { CommentFormAttaches } from '~/components/comment/CommentFormAttaches';
|
||||
import { CommentFormFormatButtons } from '~/components/comment/CommentFormFormatButtons';
|
||||
import { LocalCommentFormTextarea } from '~/components/comment/LocalCommentFormTextarea';
|
||||
import { Filler } from '~/components/containers/Filler';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
||||
import { UploadDropzone } from '~/components/upload/UploadDropzone';
|
||||
import { ERROR_LITERAL } from '~/constants/errors';
|
||||
import { EMPTY_COMMENT } from '~/constants/node';
|
||||
import { UploadSubject, UploadTarget } from '~/constants/uploads';
|
||||
import { useCommentFormFormik } from '~/hooks/comments/useCommentFormFormik';
|
||||
import { useUploader } from '~/hooks/data/useUploader';
|
||||
import { useInputPasteUpload } from '~/hooks/dom/useInputPasteUpload';
|
||||
import { IComment, INode } from '~/types';
|
||||
import { UploaderContextProvider } from '~/utils/context/UploaderContextProvider';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps {
|
||||
comment?: IComment;
|
||||
nodeId: INode['id'];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { FC, useCallback } from 'react';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
import { COMMENT_FILE_TYPES } from '~/constants/uploads';
|
||||
|
||||
interface IProps {
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
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 '~/types';
|
||||
|
||||
import { SortEnd } from 'react-sortable-hoc';
|
||||
import { moveArrItem } from '~/utils/fn';
|
||||
import { useFileDropZone } from '~/hooks';
|
||||
|
||||
import { SortableAudioGrid } from '~/components/editors/SortableAudioGrid';
|
||||
import { SortableImageGrid } from '~/components/editors/SortableImageGrid';
|
||||
import { COMMENT_FILE_TYPES } from '~/constants/uploads';
|
||||
import { useFileDropZone } from '~/hooks';
|
||||
import { IFile } from '~/types';
|
||||
import { useUploaderContext } from '~/utils/context/UploaderContextProvider';
|
||||
import { moveArrItem } from '~/utils/fn';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
const CommentFormAttaches: FC = () => {
|
||||
const {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import React, { FC, useCallback, useEffect } from 'react';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { ButtonGroup } from '~/components/input/ButtonGroup';
|
||||
import { useFormatWrapper, wrapTextInsideInput } from '~/hooks/dom/useFormatWrapper';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { FC, useCallback, useState } from 'react';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps {
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
import React, { FC, useMemo } from 'react';
|
||||
import { ICommentBlockProps } from '~/constants/comment';
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { ICommentBlockProps } from '~/constants/comment';
|
||||
import markdown from '~/styles/common/markdown.module.scss';
|
||||
import { formatText } from '~/utils/dom';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface IProps extends ICommentBlockProps {}
|
||||
|
||||
const CommentTextBlock: FC<IProps> = ({ block }) => {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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 { useCommentFormContext } from '~/hooks/comments/useCommentFormFormik';
|
||||
|
||||
interface IProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
||||
isLoading?: boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue