diff --git a/src/containers/content/ArticleContent/DesktopView/SideInfo.tsx b/src/containers/content/ArticleContent/DesktopView/SideInfo.tsx index 219cab9e4..6e5725184 100644 --- a/src/containers/content/ArticleContent/DesktopView/SideInfo.tsx +++ b/src/containers/content/ArticleContent/DesktopView/SideInfo.tsx @@ -61,7 +61,7 @@ const SideInfo: FC = ({ article }) => { - + diff --git a/src/containers/content/ArticleContent/styles/desktop_view/side_info.tsx b/src/containers/content/ArticleContent/styles/desktop_view/side_info.tsx index 1d399fa58..59f496abd 100644 --- a/src/containers/content/ArticleContent/styles/desktop_view/side_info.tsx +++ b/src/containers/content/ArticleContent/styles/desktop_view/side_info.tsx @@ -47,7 +47,7 @@ export const Count = styled.span` ` export const Value = styled.div` font-size: 13px; - color: ${theme('article.title')}; + color: ${theme('article.digest')}; margin-bottom: 5px; ` diff --git a/src/containers/content/CommunityContent/SubscribedList/ItemMenu.tsx b/src/containers/content/CommunityContent/SubscribedList/ItemMenu.tsx index 9e9c60755..9dfb2a885 100755 --- a/src/containers/content/CommunityContent/SubscribedList/ItemMenu.tsx +++ b/src/containers/content/CommunityContent/SubscribedList/ItemMenu.tsx @@ -6,7 +6,6 @@ import { FC, memo } from 'react' -import type { TCommunity } from '@/spec' import { ICON } from '@/config' import { buildLog } from '@/logger' @@ -15,11 +14,7 @@ import { Wrapper, Item, Icon, Title } from '../styles/subscribed_list/item_menu' /* eslint-disable-next-line */ const log = buildLog('C:CommunityContent') -type TProps = { - community: TCommunity -} - -const ItemMenu: FC = ({ community }) => { +const ItemMenu: FC = () => { return ( diff --git a/src/containers/content/CommunityContent/SubscribedList/index.tsx b/src/containers/content/CommunityContent/SubscribedList/index.tsx index 1b5dd0761..6b9b03b30 100755 --- a/src/containers/content/CommunityContent/SubscribedList/index.tsx +++ b/src/containers/content/CommunityContent/SubscribedList/index.tsx @@ -69,7 +69,7 @@ const SubscribedList: FC = ({ community, communities }) => { } + content={} placement="bottom" hideOnClick={false} trigger="click" diff --git a/src/containers/digest/ArticleDigest/MobileView/Layout.tsx b/src/containers/digest/ArticleDigest/MobileView/Layout.tsx index 1eedb86b1..1147a02da 100755 --- a/src/containers/digest/ArticleDigest/MobileView/Layout.tsx +++ b/src/containers/digest/ArticleDigest/MobileView/Layout.tsx @@ -1,16 +1,13 @@ import { FC, memo } from 'react' -import type { TArticle, TMetric } from '@/spec' - -import METRIC from '@/constant/metric' +import type { TArticle } from '@/spec' import PostLayout from './PostLayout' type TProps = { article: TArticle - metric?: TMetric } -const Layout: FC = ({ article, metric = METRIC.ARTICLE }) => { +const Layout: FC = ({ article }) => { return } diff --git a/src/containers/digest/ArticleDigest/MobileView/PostLayout.tsx b/src/containers/digest/ArticleDigest/MobileView/PostLayout.tsx index 27a4a52de..9c3322eaa 100755 --- a/src/containers/digest/ArticleDigest/MobileView/PostLayout.tsx +++ b/src/containers/digest/ArticleDigest/MobileView/PostLayout.tsx @@ -63,7 +63,7 @@ const PostLayout: FC = ({ metric = METRIC.ARTICLE, article }) => { - + {title} diff --git a/src/containers/digest/ArticleDigest/MobileView/index.tsx b/src/containers/digest/ArticleDigest/MobileView/index.tsx index cae94c47e..0773d12dc 100755 --- a/src/containers/digest/ArticleDigest/MobileView/index.tsx +++ b/src/containers/digest/ArticleDigest/MobileView/index.tsx @@ -46,7 +46,7 @@ const ArticleDigestContainer: FC = ({
- + diff --git a/src/containers/digest/ArticleDigest/logic.ts b/src/containers/digest/ArticleDigest/logic.ts index f85822d50..49d259b83 100755 --- a/src/containers/digest/ArticleDigest/logic.ts +++ b/src/containers/digest/ArticleDigest/logic.ts @@ -53,10 +53,6 @@ export const loadCommunity = (): void => { sr71$.query(S.community, { slug }) } -export const handleWorksUpvote = (viewerHasUpvoted: boolean): void => { - // -} - // ############################### // Data & Error handlers // ############################### diff --git a/src/containers/digest/ArticleDigest/styles/desktop_view/header.ts b/src/containers/digest/ArticleDigest/styles/desktop_view/header.ts index 5ae19c7a5..aed1cb685 100644 --- a/src/containers/digest/ArticleDigest/styles/desktop_view/header.ts +++ b/src/containers/digest/ArticleDigest/styles/desktop_view/header.ts @@ -1,7 +1,6 @@ import styled from 'styled-components' import Link from 'next/link' -import type { TMetric } from '@/spec' import css, { theme } from '@/css' import Img from '@/Img' diff --git a/src/containers/editor/ArticleEditor/AddOn/index.tsx b/src/containers/editor/ArticleEditor/AddOn/index.tsx index a97878de9..8eda37ed1 100755 --- a/src/containers/editor/ArticleEditor/AddOn/index.tsx +++ b/src/containers/editor/ArticleEditor/AddOn/index.tsx @@ -1,17 +1,14 @@ import { FC, memo } from 'react' -import type { TArticleThread } from '@/spec' - import type { TEditData } from '../spec' import PostAddOn from './PostAddOn' type TProps = { - thread: TArticleThread editData: TEditData } -const Addon: FC = ({ thread, editData }) => { +const Addon: FC = ({ editData }) => { return } diff --git a/src/containers/editor/ArticleEditor/PublishRules/index.tsx b/src/containers/editor/ArticleEditor/PublishRules/index.tsx index 1ebbb3a15..7a963a365 100755 --- a/src/containers/editor/ArticleEditor/PublishRules/index.tsx +++ b/src/containers/editor/ArticleEditor/PublishRules/index.tsx @@ -1,14 +1,8 @@ import { FC, memo } from 'react' -import type { TArticleThread } from '@/spec' - import PostRules from './PostRules' -type TProps = { - thread: TArticleThread -} - -const PublishRules: FC = ({ thread }) => { +const PublishRules: FC = () => { return } diff --git a/src/containers/editor/ArticleEditor/index.tsx b/src/containers/editor/ArticleEditor/index.tsx index c627ecf29..0be84326c 100755 --- a/src/containers/editor/ArticleEditor/index.tsx +++ b/src/containers/editor/ArticleEditor/index.tsx @@ -54,19 +54,9 @@ const ArticleEditorContainer: FC = ({ useInit(store) const { activeCat, activeTagData } = store - const { - isArchived, - archivedAt, - mode, - submitState, - groupedTags, - texts, - editData, - viewingArticle, - allowEdit, - } = store - - const { meta } = viewingArticle + const { isArchived, archivedAt, mode, submitState, groupedTags, texts, editData, allowEdit } = + store + const { title, body } = editData const initEditor = mode === 'publish' || body !== '{}' @@ -74,14 +64,6 @@ const ArticleEditorContainer: FC = ({ return ( - {/* {communityData.id && ( - - )} */} - {!allowEdit && } {isArchived && } diff --git a/src/containers/editor/ArticleEditor/logic.ts b/src/containers/editor/ArticleEditor/logic.ts index f06e6af30..f91099b4e 100755 --- a/src/containers/editor/ArticleEditor/logic.ts +++ b/src/containers/editor/ArticleEditor/logic.ts @@ -34,7 +34,7 @@ export const changeCommunity = (community: TCommunity): void => { store.mark({ community }) } -export const onTagSelect = (tags: TTag[], checked: boolean): void => { +export const onTagSelect = (tags: TTag[]): void => { store.mark({ articleTags: tags }) } diff --git a/src/containers/editor/CommunityEditor/Content/DemoCommunity.tsx b/src/containers/editor/CommunityEditor/Content/DemoCommunity.tsx index 3ec005157..157fb0125 100755 --- a/src/containers/editor/CommunityEditor/Content/DemoCommunity.tsx +++ b/src/containers/editor/CommunityEditor/Content/DemoCommunity.tsx @@ -24,7 +24,7 @@ const DemoCommunity: FC = ({ item }) => { return ( - + {item.title} diff --git a/src/containers/editor/CommunityEditor/Content/FakeBrowser/Content.tsx b/src/containers/editor/CommunityEditor/Content/FakeBrowser/Content.tsx index 6fc907769..91370007a 100755 --- a/src/containers/editor/CommunityEditor/Content/FakeBrowser/Content.tsx +++ b/src/containers/editor/CommunityEditor/Content/FakeBrowser/Content.tsx @@ -41,7 +41,7 @@ const Content: FC = ({ title = '', desc = '', logo, communityType, onHov {communityType && ( {communityIntros[communityType].threads.map((thread) => ( - onHoverThread(thread)}> + onHoverThread(thread)}> {Trans(thread)} ))} diff --git a/src/containers/editor/CommunityEditor/logic.ts b/src/containers/editor/CommunityEditor/logic.ts index 02adc9a00..cde46ec0e 100755 --- a/src/containers/editor/CommunityEditor/logic.ts +++ b/src/containers/editor/CommunityEditor/logic.ts @@ -175,7 +175,7 @@ const DataSolver = [ { match: asyncRes('hasPendingCommunityApply'), action: ({ hasPendingCommunityApply }) => { - // store.mark({ hasPendingApply: hasPendingCommunityApply.exist }) + store.mark({ hasPendingApply: hasPendingCommunityApply.exist }) }, }, { diff --git a/src/containers/editor/CoverEditor/Toolbox/ActionBlock.tsx b/src/containers/editor/CoverEditor/Toolbox/ActionBlock.tsx index ece8403e4..f1bafe683 100644 --- a/src/containers/editor/CoverEditor/Toolbox/ActionBlock.tsx +++ b/src/containers/editor/CoverEditor/Toolbox/ActionBlock.tsx @@ -2,9 +2,6 @@ import { FC, useState } from 'react' import Tooltip from '@/widgets/Tooltip' -import type { TImageRadio } from '../spec' -import { IMAGE_RATIO } from '../constant' - import { Wrapper, Block, diff --git a/src/containers/editor/CoverEditor/logic.ts b/src/containers/editor/CoverEditor/logic.ts index 0ac141ab0..78c3ad2b7 100644 --- a/src/containers/editor/CoverEditor/logic.ts +++ b/src/containers/editor/CoverEditor/logic.ts @@ -4,14 +4,7 @@ import { useEffect } from 'react' import type { TWallpaperGradientDir } from '@/spec' import { buildLog } from '@/logger' -import type { - TImagePos, - TImageRadio, - TImageRotate, - TImageSize, - TLinearBorderPos, - TSettingLevel, -} from './spec' +import type { TImagePos, TImageRadio, TImageSize, TLinearBorderPos, TSettingLevel } from './spec' import { IMAGE_POS } from './constant' import type { TStore } from './store' diff --git a/src/containers/editor/RichEditor/RealEditor.tsx b/src/containers/editor/RichEditor/RealEditor.tsx index 1a4330214..6b9a38b44 100755 --- a/src/containers/editor/RichEditor/RealEditor.tsx +++ b/src/containers/editor/RichEditor/RealEditor.tsx @@ -27,7 +27,6 @@ type TProps = { placeholder?: string data?: string type?: 'article' | 'works' | 'job' | 'comment' | 'radar' - addon?: ReactNode reinitKey?: string onChange?: (json) => void } @@ -39,7 +38,6 @@ const RichEditorContainer: FC = ({ type = 'article', reinitKey = '', onChange = log, - addon =
, }) => { useInit(store) diff --git a/src/containers/editor/RichEditor/logic.ts b/src/containers/editor/RichEditor/logic.ts index d60defda0..df673b6f8 100755 --- a/src/containers/editor/RichEditor/logic.ts +++ b/src/containers/editor/RichEditor/logic.ts @@ -1,8 +1,6 @@ import { useEffect } from 'react' // import ERR from '@/constant/err' -import EVENT from '@/constant/event' -import TYPE from '@/constant/type' import { buildLog } from '@/logger' import type { TStore } from './store' diff --git a/src/containers/editor/RichEditor/store.ts b/src/containers/editor/RichEditor/store.ts index 838b3f95b..f74bd7e35 100755 --- a/src/containers/editor/RichEditor/store.ts +++ b/src/containers/editor/RichEditor/store.ts @@ -6,7 +6,7 @@ import { T, Instance, markStates } from '@/mobx' const RichEditor = T.model('RichEditor', {}) - .views((self) => ({})) + .views(() => ({})) .actions((self) => ({ mark(sobj: Record): void { markStates(sobj, self) diff --git a/src/containers/editor/WallpaperEditor/BuildIn/AnglePanel.tsx b/src/containers/editor/WallpaperEditor/BuildIn/AnglePanel.tsx index 59f97eb19..9e6838097 100755 --- a/src/containers/editor/WallpaperEditor/BuildIn/AnglePanel.tsx +++ b/src/containers/editor/WallpaperEditor/BuildIn/AnglePanel.tsx @@ -1,4 +1,4 @@ -import { FC, memo } from 'react' +import { FC } from 'react' import { observer } from 'mobx-react' import type { TWallpaperGradientDir } from '@/spec' diff --git a/src/containers/layout/GlobalLayout/Addon.tsx b/src/containers/layout/GlobalLayout/Addon.tsx index 3e0f3a39c..7472f377e 100755 --- a/src/containers/layout/GlobalLayout/Addon.tsx +++ b/src/containers/layout/GlobalLayout/Addon.tsx @@ -1,6 +1,6 @@ import { FC, Fragment, useEffect } from 'react' import { observer } from 'mobx-react' -// import useMobileDetect from '@groupher/use-mobile-detect-hook' +// eslint-disable-next-line import/no-unresolved import { Toaster } from 'sonner' import useShortcut from '@/hooks/useShortcut' diff --git a/src/containers/thread/ArticlesThread/schema.ts b/src/containers/thread/ArticlesThread/schema.ts index c9fa9a0b2..d78e0cf89 100755 --- a/src/containers/thread/ArticlesThread/schema.ts +++ b/src/containers/thread/ArticlesThread/schema.ts @@ -9,7 +9,7 @@ const getPagedArticlesSchema = (thread) => { ` } -const getArticleFreshSchema = (thread) => { +const getArticleFreshSchema = () => { // TODO: commentParticipants return gql` query post($id: ID!, $userHasLogin: Boolean!) { diff --git a/src/containers/thread/ChangelogThread/index.tsx b/src/containers/thread/ChangelogThread/index.tsx index b52ab23d8..0049ed936 100755 --- a/src/containers/thread/ChangelogThread/index.tsx +++ b/src/containers/thread/ChangelogThread/index.tsx @@ -18,13 +18,9 @@ import { useInit } from './logic' /* eslint-disable-next-line */ type TProps = { changelogThread?: TStore - testid?: string } -const ChangelogThreadContainer: FC = ({ - changelogThread: store, - testid = 'changelog-thread', -}) => { +const ChangelogThreadContainer: FC = ({ changelogThread: store }) => { useInit(store) const { globalLayout, tagsMode, pagedChangelogsData } = store diff --git a/src/containers/thread/DashboardThread/BasicInfo/BaseInfo.tsx b/src/containers/thread/DashboardThread/BasicInfo/BaseInfo.tsx index 326eae50a..f4c466cee 100644 --- a/src/containers/thread/DashboardThread/BasicInfo/BaseInfo.tsx +++ b/src/containers/thread/DashboardThread/BasicInfo/BaseInfo.tsx @@ -1,7 +1,5 @@ import { FC, memo } from 'react' -import type { TPostLayout } from '@/spec' - import { Br } from '@/widgets/Common' import OSSUploader from '@/widgets/OSSUploader' @@ -24,12 +22,11 @@ import { import { edit } from '../logic' type TProps = { - testid?: TPostLayout settings: TBaseInfoSettings touched: TTouched } -const BasicInfo: FC = ({ testid = 'basic-info', settings, touched }) => { +const BasicInfo: FC = ({ settings, touched }) => { const { saving, desc, title, introduction, logo } = settings return ( diff --git a/src/containers/thread/DashboardThread/BasicInfo/OtherInfo/index.tsx b/src/containers/thread/DashboardThread/BasicInfo/OtherInfo/index.tsx index 8d36d5209..2f9121cf2 100644 --- a/src/containers/thread/DashboardThread/BasicInfo/OtherInfo/index.tsx +++ b/src/containers/thread/DashboardThread/BasicInfo/OtherInfo/index.tsx @@ -1,7 +1,5 @@ import { FC, memo } from 'react' -import type { TPostLayout } from '@/spec' - import CitySelector from '@/widgets/CitySelector' import { Br, SexyDivider } from '@/widgets/Common' @@ -15,12 +13,11 @@ import { Wrapper, Label, Inputer, Desc } from '../../styles/basic_info/other_inf import { edit } from '../../logic' type TProps = { - testid?: TPostLayout settings: TBaseInfoSettings touched: TTouched } -const OtherInfo: FC = ({ testid = 'basic-info', settings, touched }) => { +const OtherInfo: FC = ({ settings, touched }) => { const { city, techstack } = settings return ( diff --git a/src/containers/thread/DashboardThread/BasicInfo/SocialInfo.tsx b/src/containers/thread/DashboardThread/BasicInfo/SocialInfo.tsx index a66dcd84a..b448850c3 100644 --- a/src/containers/thread/DashboardThread/BasicInfo/SocialInfo.tsx +++ b/src/containers/thread/DashboardThread/BasicInfo/SocialInfo.tsx @@ -1,7 +1,5 @@ import { FC, memo } from 'react' -import type { TPostLayout } from '@/spec' - import SocialEditor from '@/widgets/SocialEditor' import { SETTING_FIELD } from '../constant' @@ -13,12 +11,11 @@ import { Wrapper } from '../styles/basic_info/base_info' import { updateSocialLinks } from '../logic' type TProps = { - testid?: TPostLayout settings: TBaseInfoSettings touched: TTouched } -const SocialInfo: FC = ({ testid = 'basic-info', settings, touched }) => { +const SocialInfo: FC = ({ settings, touched }) => { const { socialLinks, saving } = settings return ( diff --git a/src/containers/thread/DashboardThread/BasicInfo/index.tsx b/src/containers/thread/DashboardThread/BasicInfo/index.tsx index 2a71aee78..6bd70ec40 100755 --- a/src/containers/thread/DashboardThread/BasicInfo/index.tsx +++ b/src/containers/thread/DashboardThread/BasicInfo/index.tsx @@ -2,7 +2,6 @@ import { FC, useEffect } from 'react' import { observer } from 'mobx-react' import Router from 'next/router' -import type { TPostLayout } from '@/spec' import { DASHBOARD_BASEINFO_ROUTE } from '@/constant/route' import VIEW from '@/constant/view' @@ -22,12 +21,11 @@ import { Wrapper, Banner, TabsWrapper } from '../styles/basic_info' import { edit, loadBaseInfo } from '../logic' type TProps = { - testid?: TPostLayout settings: TBaseInfoSettings touched: TTouched } -const BasicInfo: FC = ({ testid = 'basic-info', settings, touched }) => { +const BasicInfo: FC = ({ settings, touched }) => { const curCommunity = useViewingCommunity() const { baseInfoTab } = settings diff --git a/src/containers/thread/DashboardThread/Doc/BlockLayout/Block.tsx b/src/containers/thread/DashboardThread/Doc/BlockLayout/Block.tsx index 9e0e6f443..d7485c1fd 100644 --- a/src/containers/thread/DashboardThread/Doc/BlockLayout/Block.tsx +++ b/src/containers/thread/DashboardThread/Doc/BlockLayout/Block.tsx @@ -39,7 +39,7 @@ const Block: FC = ({ color, title }) => {
- + {title}
diff --git a/src/containers/thread/DashboardThread/Domain/index.tsx b/src/containers/thread/DashboardThread/Domain/index.tsx index 9e41cd4e6..2a8e975cf 100755 --- a/src/containers/thread/DashboardThread/Domain/index.tsx +++ b/src/containers/thread/DashboardThread/Domain/index.tsx @@ -2,11 +2,7 @@ import { FC, memo } from 'react' import { Wrapper } from '../styles/domain' -type TProps = { - testid?: string -} - -const Domain: FC = ({ testid = 'domain' }) => { +const Domain: FC = () => { return (
Domain
diff --git a/src/containers/thread/DashboardThread/Overview/index.tsx b/src/containers/thread/DashboardThread/Overview/index.tsx index db37bdf71..895279821 100644 --- a/src/containers/thread/DashboardThread/Overview/index.tsx +++ b/src/containers/thread/DashboardThread/Overview/index.tsx @@ -1,7 +1,5 @@ import { FC, memo, useEffect } from 'react' -import type { TPostLayout } from '@/spec' - import type { TOverview } from '../spec' import Portal from '../Portal' @@ -11,11 +9,10 @@ import { Wrapper, Section } from '../styles/overview' import { loadCommunityOverview } from '../logic' export type TProps = { - testid?: TPostLayout data: TOverview } -const Overview: FC = ({ testid = 'basic-info', data }) => { +const Overview: FC = ({ data }) => { useEffect(() => { setTimeout(() => { loadCommunityOverview() diff --git a/src/containers/thread/DashboardThread/SEO/OpenGraph.tsx b/src/containers/thread/DashboardThread/SEO/OpenGraph.tsx index 28d393b16..5a1e843b9 100644 --- a/src/containers/thread/DashboardThread/SEO/OpenGraph.tsx +++ b/src/containers/thread/DashboardThread/SEO/OpenGraph.tsx @@ -1,7 +1,5 @@ import { FC, memo } from 'react' -import type { TPostLayout } from '@/spec' - import ToggleSwitch from '@/widgets/Buttons/ToggleSwitch' import type { TSEOSettings } from '../spec' @@ -12,7 +10,6 @@ import { Wrapper, Label, EnableDesc, DetailLink, Inputer } from '../styles/seo/o import { edit, toggleSEO } from '../logic' type TProps = { - testid?: TPostLayout settings: TSEOSettings } @@ -20,7 +17,7 @@ type TProps = { see: https://mintlify.com/docs/settings/seo for details */ -const OpenGraph: FC = ({ testid = 'seo', settings }) => { +const OpenGraph: FC = ({ settings }) => { return ( = ({ testid = 'basic-info', settings, touched }) => { +const BasicInfo: FC = ({ settings, touched }) => { const curCommunity = useViewingCommunity() const { seoTab, saving } = settings diff --git a/src/containers/thread/DashboardThread/SideMenu/Group.tsx b/src/containers/thread/DashboardThread/SideMenu/Group.tsx index ca287b755..eafcbae62 100755 --- a/src/containers/thread/DashboardThread/SideMenu/Group.tsx +++ b/src/containers/thread/DashboardThread/SideMenu/Group.tsx @@ -1,4 +1,4 @@ -import { FC, memo, useState } from 'react' +import { FC, useState } from 'react' import { observer } from 'mobx-react' import type { TCommunity, TDashboardPath } from '@/spec' diff --git a/src/containers/thread/DashboardThread/ThirdPart/index.tsx b/src/containers/thread/DashboardThread/ThirdPart/index.tsx index e4b5d4992..8e5de8e91 100755 --- a/src/containers/thread/DashboardThread/ThirdPart/index.tsx +++ b/src/containers/thread/DashboardThread/ThirdPart/index.tsx @@ -2,11 +2,7 @@ import { FC, memo } from 'react' import { Wrapper } from '../styles/third_part' -type TProps = { - testid?: string -} - -const ThirdPart: FC = ({ testid = 'third-part' }) => { +const ThirdPart: FC = () => { return (
ThirdPart
diff --git a/src/containers/thread/DashboardThread/Threads/index.tsx b/src/containers/thread/DashboardThread/Threads/index.tsx index fb0b3f780..96cc587b7 100755 --- a/src/containers/thread/DashboardThread/Threads/index.tsx +++ b/src/containers/thread/DashboardThread/Threads/index.tsx @@ -14,11 +14,10 @@ import { Wrapper, Desc } from '../styles/threads' import { enableThread } from '../logic' type TProps = { - testid?: string settings: TEnableConfig } -const Threads: FC = ({ testid = 'threads', settings }) => { +const Threads: FC = ({ settings }) => { return ( diff --git a/src/containers/thread/DashboardThread/constant.tsx b/src/containers/thread/DashboardThread/constant.tsx index fb7f366b4..e5d6a7938 100755 --- a/src/containers/thread/DashboardThread/constant.tsx +++ b/src/containers/thread/DashboardThread/constant.tsx @@ -472,7 +472,7 @@ export const EMPTY_MEDIA_REPORT = { editUrl: '', } -const demoMarkdown = ` +export const demoMarkdown = ` this is a paragraph - this is a list diff --git a/src/containers/thread/DashboardThread/logic/faq.ts b/src/containers/thread/DashboardThread/logic/faq.ts index 6590ce5a6..581cbee9f 100644 --- a/src/containers/thread/DashboardThread/logic/faq.ts +++ b/src/containers/thread/DashboardThread/logic/faq.ts @@ -1,4 +1,4 @@ -import { find, findIndex, reject } from 'ramda' +import { find, findIndex } from 'ramda' import type { TFAQSection } from '@/spec' import { toJS } from '@/mobx' diff --git a/src/containers/thread/DocThread/ArticleLayout/index.tsx b/src/containers/thread/DocThread/ArticleLayout/index.tsx index ca9a832f3..b8e28e7e8 100644 --- a/src/containers/thread/DocThread/ArticleLayout/index.tsx +++ b/src/containers/thread/DocThread/ArticleLayout/index.tsx @@ -30,11 +30,10 @@ import { import { gotoDetailLayout } from '../logic' type TProps = { - testid?: string isFAQArticleLayout: boolean } -const ArticleLayout: FC = ({ testid = 'ArtileLayout', isFAQArticleLayout }) => { +const ArticleLayout: FC = ({ isFAQArticleLayout }) => { const [filetreeOpen, setFileTreeOpen] = useState(true) const { isMobile } = useMobileDetect() diff --git a/src/containers/thread/DocThread/BlocksLayout/Category.tsx b/src/containers/thread/DocThread/BlocksLayout/Category.tsx index bd18c842a..2b49a47f1 100644 --- a/src/containers/thread/DocThread/BlocksLayout/Category.tsx +++ b/src/containers/thread/DocThread/BlocksLayout/Category.tsx @@ -22,11 +22,10 @@ const FOLD_LIMIT = 5 type TProps = { color: TColorName title: string - desc: string articles: TArticle[] } -const Category: FC = ({ color, title, desc, articles }) => { +const Category: FC = ({ color, title, articles }) => { const [sliceCount, setSliceCount] = useState(FOLD_LIMIT) return ( diff --git a/src/containers/thread/DocThread/BlocksLayout/index.tsx b/src/containers/thread/DocThread/BlocksLayout/index.tsx index 11ed21c65..5a338a5cb 100644 --- a/src/containers/thread/DocThread/BlocksLayout/index.tsx +++ b/src/containers/thread/DocThread/BlocksLayout/index.tsx @@ -7,11 +7,7 @@ import { mockHelpCats } from '@/mock' import Category from './Category' import { Wrapper, CatsWrapper } from '../styles/blocks_layout' -type TProps = { - testid?: string -} - -const BlocksLayout: FC = ({ testid = 'home' }) => { +const BlocksLayout: FC = () => { const cats = mockHelpCats() const bannerLayout = useBannerLayout() @@ -19,13 +15,7 @@ const BlocksLayout: FC = ({ testid = 'home' }) => { {cats.map((cat) => ( - + ))} diff --git a/src/containers/thread/DocThread/CardsLayout/index.tsx b/src/containers/thread/DocThread/CardsLayout/index.tsx index be880cca6..faec99297 100644 --- a/src/containers/thread/DocThread/CardsLayout/index.tsx +++ b/src/containers/thread/DocThread/CardsLayout/index.tsx @@ -7,11 +7,7 @@ import useBannerLayout from '@/hooks/useBannerLayout' import Category from './Category' import { Wrapper, CatsWrapper } from '../styles/cards_layout' -type TProps = { - testid?: string -} - -const BlocksLayout: FC = ({ testid = 'home' }) => { +const BlocksLayout: FC = () => { const cats = mockHelpCats() const bannerLayout = useBannerLayout() diff --git a/src/containers/thread/DocThread/FaqLayout.tsx b/src/containers/thread/DocThread/FaqLayout.tsx index 15eeb35a1..4c6b11ab0 100644 --- a/src/containers/thread/DocThread/FaqLayout.tsx +++ b/src/containers/thread/DocThread/FaqLayout.tsx @@ -7,11 +7,9 @@ import FaqList from '@/widgets/FaqList' import { Wrapper } from './styles/faq_layout' -type TProps = { - testid?: string -} & TSpace +type TProps = TSpace -const FaqLayout: FC = ({ testid = 'FaqLayout', ...restProps }) => { +const FaqLayout: FC = ({ ...restProps }) => { return ( diff --git a/src/containers/thread/DocThread/ListsLayout/index.tsx b/src/containers/thread/DocThread/ListsLayout/index.tsx index 7e36c3b97..f0b23e03a 100644 --- a/src/containers/thread/DocThread/ListsLayout/index.tsx +++ b/src/containers/thread/DocThread/ListsLayout/index.tsx @@ -5,11 +5,7 @@ import { mockHelpCats } from '@/mock' import Category from './Category' import { Wrapper, CatsWrapper } from '../styles/lists_layout' -type TProps = { - testid?: string -} - -const ListsLayout: FC = ({ testid = 'home' }) => { +const ListsLayout: FC = () => { const cats = mockHelpCats() return ( diff --git a/src/containers/thread/KanbanThread/Actions.tsx b/src/containers/thread/KanbanThread/Actions.tsx index 94309ed42..feb11fb4e 100755 --- a/src/containers/thread/KanbanThread/Actions.tsx +++ b/src/containers/thread/KanbanThread/Actions.tsx @@ -6,11 +6,7 @@ import Facepile from '@/widgets/Facepile' import { Wrapper, Title, Count, LeftPart, RightPart, KanbanIcon, JoinTitle } from './styles/actions' -type TProps = { - testid?: string -} - -const Actions: FC = ({ testid = 'actions' }) => { +const Actions: FC = () => { return ( diff --git a/src/containers/thread/ThreadSidebar/styles/classic_layout.ts b/src/containers/thread/ThreadSidebar/styles/classic_layout.ts index 0ae2472b3..c8fecc3b2 100755 --- a/src/containers/thread/ThreadSidebar/styles/classic_layout.ts +++ b/src/containers/thread/ThreadSidebar/styles/classic_layout.ts @@ -73,5 +73,5 @@ export const NoteWrapper = styled.div` export const TagsBarWrapper = styled.div` margin-top: 25px; - max-width: 160px; + max-width: 186px; ` diff --git a/src/containers/tool/ArticleSticker/CommunitySticker.tsx b/src/containers/tool/ArticleSticker/CommunitySticker.tsx deleted file mode 100755 index 5fdf256e0..000000000 --- a/src/containers/tool/ArticleSticker/CommunitySticker.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { FC, Fragment, memo } from 'react' - -import type { TViewing } from '@/spec' -import { ICON_BASE } from '@/config' -import Button from '@/widgets/Buttons/Button' - -import { - ItemWrapper, - CommunityIcon, - CommunityTitle, - Divider, -} from './styles/community_sticker' - -type TProps = { - data?: TViewing - show?: boolean -} - -const CommunitySticker: FC = ({ show, data }) => { - return ( - - - - Elixir - - - - - ) -} - -export default memo(CommunitySticker) diff --git a/src/containers/tool/ArticleSticker/RightSticker/index.tsx b/src/containers/tool/ArticleSticker/RightSticker/index.tsx index 278019959..241165166 100755 --- a/src/containers/tool/ArticleSticker/RightSticker/index.tsx +++ b/src/containers/tool/ArticleSticker/RightSticker/index.tsx @@ -1,15 +1,14 @@ import { FC, memo } from 'react' -import type { TArticle, TThread } from '@/spec' +import type { TThread } from '@/spec' import Toc from './Toc' type TProps = { - article: TArticle thread: TThread show?: boolean } -const RightSticker: FC = ({ article, thread, show }) => { +const RightSticker: FC = ({ thread, show }) => { switch (thread) { default: { return diff --git a/src/containers/tool/ArticleSticker/index.tsx b/src/containers/tool/ArticleSticker/index.tsx index 5440ab4c1..1c08bd5fa 100755 --- a/src/containers/tool/ArticleSticker/index.tsx +++ b/src/containers/tool/ArticleSticker/index.tsx @@ -19,13 +19,12 @@ import GotoTop from '@/widgets/GotoTop' import type { TStore } from './store' // import LeftSticker from './LeftSticker/index' -import RightSticker from './RightSticker' -import { Wrapper, InnerWrapper, MainWrapper, GoTopWrapper } from './styles' +import { Wrapper, InnerWrapper, GoTopWrapper } from './styles' import { useInit } from './logic' import LeftSticker from './LeftSticker' -import CommentSticker from './CommentSticker' +// import CommentSticker from './CommentSticker' /* eslint-disable-next-line */ const log = buildLog('C:ArticleSticker') @@ -58,14 +57,6 @@ const ArticleStickerContainer: FC = ({ - {/* - - - */} diff --git a/src/containers/tool/ArticleSticker/logic.ts b/src/containers/tool/ArticleSticker/logic.ts index 6fd0ef300..0aab2e915 100755 --- a/src/containers/tool/ArticleSticker/logic.ts +++ b/src/containers/tool/ArticleSticker/logic.ts @@ -1,7 +1,4 @@ import { useEffect } from 'react' -// import { } from 'ramda' - -import EVENT from '@/constant/event' import { authWarn, addCollection } from '@/signal' import { buildLog } from '@/logger' diff --git a/src/containers/tool/ArticleSticker/styles/community_sticker.ts b/src/containers/tool/ArticleSticker/styles/community_sticker.ts deleted file mode 100755 index 993c4d66b..000000000 --- a/src/containers/tool/ArticleSticker/styles/community_sticker.ts +++ /dev/null @@ -1,39 +0,0 @@ -import styled from 'styled-components' - -import Img from '@/Img' -import css, { theme } from '@/css' - -export const ItemWrapper = styled.div` - ${css.column('align-both')}; - position: relative; - width: 80px; -` -const Icon = styled(Img)` - ${css.size(22)}; - transition: all 0.2s; - cursor: pointer; -` -export const CommunityIcon = styled(Icon)`` -export const CommunityTitle = styled.div` - color: ${theme('article.digest')}; - font-size: 13px; - margin-bottom: 8px; - margin-top: 8px; -` -export const Divider = styled.div` - width: 50px; - height: 1px; - background: #004250; - margin-top: 20px; - margin-bottom: 20px; -` -export const Number = styled.div` - ${css.row('align-baseline')}; - color: ${theme('article.title')}; - font-size: 13px; - margin-top: 5px; -` -export const Text = styled.div` - color: ${theme('article.digest')}; - font-size: 11px; -` diff --git a/src/containers/tool/AuthWall/index.tsx b/src/containers/tool/AuthWall/index.tsx index 92a9751e9..d3e9c40de 100644 --- a/src/containers/tool/AuthWall/index.tsx +++ b/src/containers/tool/AuthWall/index.tsx @@ -5,7 +5,7 @@ import { FC } from 'react' -// import { buildLog } from '@/logger' +import { buildLog } from '@/logger' import { bond } from '@/mobx' import { Br, Divider } from '@/widgets/Common' @@ -33,7 +33,7 @@ import { import { useInit, onClose } from './logic' -// const log = buildLog('C:Subscriber') +const log = buildLog('C:AuthMail') type TProps = { authWall?: TStore @@ -58,50 +58,50 @@ const AuthWallContainer: FC = ({ authWall: store, testid = 'authWall' })

使用第三方账号登入


- console.log('change')}> + log('change')}> 微信 - console.log('change')}> + 'change'}> 微博 - console.log('change')}> + log('change')}> QQ - console.log('change')}> + log('change')}> 豆瓣 - console.log('change')}> + log('change')}> Github - console.log('change')}> + log('change')}> Twitter - console.log('change')}> + log('change')}> Google - console.log('change')}> + log('change')}> diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/Body.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/Body.tsx deleted file mode 100755 index 017e841ee..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/Body.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { FC, memo } from 'react' -import { isEmpty, filter } from 'ramda' - -import type { TCommunity, TCommunitySetterStyle } from '@/spec' -import { Br } from '@/widgets/Common' -import CustomScroller from '@/widgets/CustomScroller' -import NoticeBar from '@/widgets/NoticeBar' -import LavaLampLoading from '@/widgets/Loading/LavaLampLoading' - -import type { TCommunitiesList, TTexts } from '../spec' -import SearchBox from './SearchBox' -import List from './List' - -import { Wrapper, InnerWrapper } from '../styles/tag_setter/body' - -type TProps = { - texts: TTexts - communitiesList: TCommunitiesList - communityStyle: TCommunitySetterStyle - onCommunitySelect: (community: TCommunity, select: boolean) => void -} - -const isValid = (communities: TCommunity[]): boolean => { - return filter((c) => !!c.slug, communities).length !== 0 -} - -const Body: FC = ({ texts, communitiesList, onCommunitySelect, communityStyle }) => { - const { - canActOnSeleted, - searching, - searched, - searchValue, - searchedCommunities, - commonUsedCommunities, - selectedCommunities, - } = communitiesList - - return ( - - - - {texts.notice ? ( - - ) : ( -
 
- )} - - - {isValid(selectedCommunities) && ( - - )} - - {searching && } - {searched && isEmpty(searchedCommunities) && ( - - )} - - {isEmpty(searchValue) && ( - - )} - {!searching && !isEmpty(searchValue) && !isEmpty(searchedCommunities) && ( - - )} - -
-
- ) -} - -export default memo(Body) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Normal.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Normal.tsx deleted file mode 100755 index 194689041..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Normal.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { FC, memo } from 'react' - -import { cutRest } from '@/fmt' - -import { SpaceGrow } from '@/widgets/Common' -import Checker from '@/widgets/Checker' -import DotDivider from '@/widgets/DotDivider' - -import type { TProps as TBaseProps } from '.' - -// import { TAG_VIEW } from '../constant' -import { - Wrapper, - Intro, - Logo, - Title, - Name, - Raw, - Digest, - CheckWrapper, -} from '../../styles/community_setter/community_card/normal' - -type TProps = Omit - -const CommunityCard: FC = ({ - item, - canActOnSeleted, - checked = false, - onCommunitySelect, -}) => { - return ( - - - - - <Name>{item.title}</Name> - {item?.title?.length < 8 && ( - <> - <DotDivider space={5} /> - <Raw>{item.slug}</Raw> - </> - )} - - <SpaceGrow /> - - <CheckWrapper> - <Checker - checked={checked} - size="small" - disabled={!canActOnSeleted} - onChange={(checked) => onCommunitySelect(item, checked)} - /> - </CheckWrapper> - - {item?.title?.length >= 8 && ( - <> - {item.slug} - - )} - - {cutRest(item.desc, 24)} - {/* {cutRest('may be the most sexiest item for developer, ever', 20)} */} - - - - ) -} - -export default memo(CommunityCard) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Simple.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Simple.tsx deleted file mode 100755 index 4499d8685..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/Simple.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { FC, memo } from 'react' - -import { SpaceGrow } from '@/widgets/Common' -import Checker from '@/widgets/Checker' - -import type { TProps as TBaseProps } from '.' - -// import { TAG_VIEW } from '../constant' -import { - Wrapper, - Intro, - Logo, - Title, - Name, - CheckWrapper, -} from '../../styles/community_setter/community_card/simple' - -type TProps = Omit - -const CommunityCard: FC = ({ - item, - canActOnSeleted, - checked = false, - onCommunitySelect, -}) => { - return ( - - - - - <Name>{item.title}</Name> - <SpaceGrow /> - <CheckWrapper> - <Checker - checked={checked} - size="small" - disabled={!canActOnSeleted} - onChange={(checked) => onCommunitySelect(item, checked)} - /> - </CheckWrapper> - - - - ) -} - -export default memo(CommunityCard) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/index.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/index.tsx deleted file mode 100755 index cdfc34fd8..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/CommunityCard/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FC, memo } from 'react' - -import type { TCommunity, TCommunitySetterStyle } from '@/spec' - -import { COMMUNITY_STYLE } from '../../constant' -import Simple from './Simple' -import Normal from './Normal' - -export type TProps = { - item: TCommunity - checked?: boolean - canActOnSeleted: boolean - onCommunitySelect: (community: TCommunity, select: boolean) => void - - communityStyle?: TCommunitySetterStyle -} - -const CommunityCard: FC = ({ - communityStyle = COMMUNITY_STYLE.NORMAL, - ...restProps -}) => { - if (communityStyle === COMMUNITY_STYLE.NORMAL) { - return - } - - return -} - -export default memo(CommunityCard) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/Footer.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/Footer.tsx deleted file mode 100755 index a4307e3ef..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/Footer.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { FC, memo } from 'react' - -import ArrowButton from '@/widgets/Buttons/ArrowButton' - -import type { TType } from '../spec' -import { TYPE } from '../constant' -import { Wrapper } from '../styles/tag_setter/footer' -import { changeSetter } from '../logic' - -type TProps = { - type: TType -} - -const Footer: FC = ({ type }) => { - if (type === TYPE.SELECT_COMMUNITY) return null - - return ( - - changeSetter(TYPE.TAG)}>下一步 - - ) -} - -export default memo(Footer) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/Header.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/Header.tsx deleted file mode 100755 index cca7c7f2a..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/Header.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { FC, memo } from 'react' - -// import IconButton from '@/widgets/Buttons/IconButton' -import type { TCommunityView, TTexts } from '../spec' - -import { Wrapper, Title } from '../styles/community_setter/header' -// import { useStore } from '../logic' - -// import LavaLampLoading from '@/widgets/Loading/LavaLampLoading' - -type TProps = { - view: TCommunityView - texts: TTexts -} - -const Header: FC = ({ view, texts }) => { - return ( - - {texts.header} - {/* - - - */} - - ) -} - -export default memo(Header) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/List.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/List.tsx deleted file mode 100755 index f69aac8d4..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/List.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { FC, memo } from 'react' - -import type { TCommunity, TCommunitySetterStyle } from '@/spec' - -// import Tooltip from '@/widgets/Tooltip' -import CommunityCard from './CommunityCard' - -import { Wrapper, InnerWrapper, HintTitle } from '../styles/community_setter/list' - -type TProps = { - title: string - highlightTitle?: boolean - communities: TCommunity[] - canActOnSeleted?: boolean - allChecked?: boolean - communityStyle: TCommunitySetterStyle - onCommunitySelect?: (community: TCommunity, select: boolean) => void -} - -const CommunitiesList: FC = ({ - title, - canActOnSeleted = true, - communities, - highlightTitle = false, - allChecked = false, - communityStyle, - onCommunitySelect, -}) => { - return ( - - {title} - - {communities.map((item) => ( - - ))} - - - ) -} - -export default memo(CommunitiesList) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/SearchBox.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/SearchBox.tsx deleted file mode 100755 index 67fe386d3..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/SearchBox.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { FC, memo } from 'react' - -import type { TTexts } from '../spec' -import { Wrapper, SearchInput } from '../styles/community_setter/search_box' -import { communityOnSearch } from '../logic' - -type TProps = { - searchValue: string - texts: TTexts -} - -const SearchBox: FC = ({ searchValue, texts }) => { - return ( - - - - ) -} - -export default memo(SearchBox) diff --git a/src/containers/tool/CommunityTagSetter/CommunitySetter/index.tsx b/src/containers/tool/CommunityTagSetter/CommunitySetter/index.tsx deleted file mode 100755 index d1de0c760..000000000 --- a/src/containers/tool/CommunityTagSetter/CommunitySetter/index.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * TagList - * - */ - -import { FC, memo } from 'react' - -import type { TCommunity, TCommunitySetterStyle } from '@/spec' -import { buildLog } from '@/logger' - -import Header from './Header' -import Body from './Body' -import Footer from './Footer' - -import type { TCommunityView, TCommunitiesList, TType, TTexts } from '../spec' -import { Wrapper } from '../styles/tag_setter' - -/* eslint-disable-next-line */ -const log = buildLog('w:TagList:index') - -export type TProps = { - type: TType - communityStyle: TCommunitySetterStyle - texts: TTexts - view: TCommunityView - communitiesList: TCommunitiesList - onCommunitySelect?: (community: TCommunity, select: boolean) => void -} - -const CommunitySetter: FC = ({ - view, - type, - communityStyle, - texts, - communitiesList, - onCommunitySelect, -}) => { - return ( - -
- -