From 7ef20c002908c166ed14b16eba2877b67535b28a Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:35:26 +0800 Subject: [PATCH 001/244] feat(UserDigest): add for New Search --- src/components/UserDigest/Concise/gql.ts | 20 ++++ src/components/UserDigest/Concise/index.tsx | 105 +++++++++++++++++++ src/components/UserDigest/Concise/styles.css | 56 ++++++++++ src/components/UserDigest/index.tsx | 2 + 4 files changed, 183 insertions(+) create mode 100644 src/components/UserDigest/Concise/gql.ts create mode 100644 src/components/UserDigest/Concise/index.tsx create mode 100644 src/components/UserDigest/Concise/styles.css diff --git a/src/components/UserDigest/Concise/gql.ts b/src/components/UserDigest/Concise/gql.ts new file mode 100644 index 0000000000..a9dfbac214 --- /dev/null +++ b/src/components/UserDigest/Concise/gql.ts @@ -0,0 +1,20 @@ +import gql from 'graphql-tag' + +import { Avatar } from '~/components/Avatar' + +export const fragments = { + user: gql` + fragment UserDigestConciseUser on User { + id + userName + displayName + status { + state + } + ...AvatarUser + ...AvatarUserLogbook + } + ${Avatar.fragments.user} + ${Avatar.fragments.logbook} + `, +} diff --git a/src/components/UserDigest/Concise/index.tsx b/src/components/UserDigest/Concise/index.tsx new file mode 100644 index 0000000000..6ec63df80b --- /dev/null +++ b/src/components/UserDigest/Concise/index.tsx @@ -0,0 +1,105 @@ +import classNames from 'classnames' + +import { LinkWrapper, Translate } from '~/components' +import { Avatar, AvatarProps, AvatarSize } from '~/components/Avatar' + +import { toPath } from '~/common/utils' + +import { fragments } from './gql' +import styles from './styles.css' + +import { UserDigestConciseUser } from './__generated__/UserDigestConciseUser' + +/** + * UserDigest.Concise is a component for presenting user's: + * + * - avatar + * - userName + * - displayName + * + * Usage: + * + * + */ + +export type UserDigestConciseProps = { + user: UserDigestConciseUser + + avatarSize?: Extract + nameStyle?: 'tight' | 'loose' + + disabled?: boolean + onClick?: () => void +} & AvatarProps + +export const toUserDigestConcisePlaceholder = (displayName: string) => + ({ + __typename: 'User', + id: '', + userName: '', + displayName, + status: null, + avatar: null, + liker: { + __typename: 'Liker', + civicLiker: false, + }, + } as UserDigestConciseUser) + +const Concise = ({ + user, + avatarSize, + nameStyle = 'loose', + disabled, + + onClick, +}: UserDigestConciseProps) => { + const isArchived = user?.status?.state === 'archived' + const path = toPath({ + page: 'userProfile', + userName: user.userName || '', + }) + const containerClasses = classNames({ + container: true, + disabled: disabled || isArchived, + }) + const nameClasses = classNames({ + name: true, + [`name-style-${nameStyle}`]: !!nameStyle, + }) + + if (isArchived) { + return ( + + + + + + + + + + + + ) + } + + return ( + +
+ + + + {user.displayName} + {user.userName && @{user.userName}} + + + +
+
+ ) +} + +Concise.fragments = fragments + +export default Concise diff --git a/src/components/UserDigest/Concise/styles.css b/src/components/UserDigest/Concise/styles.css new file mode 100644 index 0000000000..5bef18bf70 --- /dev/null +++ b/src/components/UserDigest/Concise/styles.css @@ -0,0 +1,56 @@ +.container { + @mixin flex-center-start; + + &:not(.disabled) { + &:hover, + &:focus { + & .displayname { + text-decoration: underline; + } + } + } +} + +.name { + display: flex; + flex-direction: column; + flex-wrap: wrap; + align-items: flex-start; + margin-left: var(--spacing-x-tight); +} + +.displayname { + @mixin line-clamp; + + font-weight: var(--font-weight-medium); +} + +.username { + @mixin line-clamp; + + color: var(--color-grey); +} + +.name-style-loose { + & .displayname { + font-size: var(--font-size-md-s); + line-height: 1.5rem; + } + + & .username { + font-size: var(--font-size-sm-s); + line-height: 1.5rem; + } +} + +.name-style-tight { + & .displayname { + font-size: var(--font-size-sm); + line-height: 1rem; + } + + & .username { + font-size: var(--font-size-xs); + line-height: 1rem; + } +} diff --git a/src/components/UserDigest/index.tsx b/src/components/UserDigest/index.tsx index bb4b147434..470b797c1a 100644 --- a/src/components/UserDigest/index.tsx +++ b/src/components/UserDigest/index.tsx @@ -1,9 +1,11 @@ +import Concise from './Concise' import Mini from './Mini' import Plain from './Plain' import Rich from './Rich' import Verbose from './Verbose' export const UserDigest = { + Concise, Mini, Rich, Plain, From 46c9dfe702ec971eca0a4a5f83bd1daea42bc584 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:36:52 +0800 Subject: [PATCH 002/244] feat(Storybook): add example --- .../components/UserDigest/Concise.stories.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/stories/components/UserDigest/Concise.stories.tsx diff --git a/src/stories/components/UserDigest/Concise.stories.tsx b/src/stories/components/UserDigest/Concise.stories.tsx new file mode 100644 index 0000000000..40ad162085 --- /dev/null +++ b/src/stories/components/UserDigest/Concise.stories.tsx @@ -0,0 +1,31 @@ +import { MockedProvider } from '@apollo/react-testing' +import { ComponentMeta, ComponentStory } from '@storybook/react' +import React from 'react' + +import { UserDigest } from '~/components' + +import { MOCK_USER } from '../../mocks' + +export default { + title: 'Components/UserDigest', + component: UserDigest.Concise, +} as ComponentMeta + +const Template: ComponentStory = (args) => ( + + + +) + +export const Concise = Template.bind({}) +Concise.args = { + user: MOCK_USER, + avatarSize: 'xl', +} + +export const ConciseTight = Template.bind({}) +ConciseTight.args = { + user: MOCK_USER, + avatarSize: 'lg', + nameStyle: 'tight', +} From a119f646675adb8120045f466a04378c21d8de7e Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:15:36 +0800 Subject: [PATCH 003/244] feat(TagDigest): add for New Search --- src/components/TagDigest/Concise/index.tsx | 76 +++++++++++++++++++++ src/components/TagDigest/Concise/styles.css | 5 ++ src/components/TagDigest/index.tsx | 2 + 3 files changed, 83 insertions(+) create mode 100644 src/components/TagDigest/Concise/index.tsx create mode 100644 src/components/TagDigest/Concise/styles.css diff --git a/src/components/TagDigest/Concise/index.tsx b/src/components/TagDigest/Concise/index.tsx new file mode 100644 index 0000000000..8b16b7728e --- /dev/null +++ b/src/components/TagDigest/Concise/index.tsx @@ -0,0 +1,76 @@ +import gql from 'graphql-tag' + +import { + Card, + CardProps, + IconArticle16, + IconHashTag16, + TextIcon, +} from '~/components' + +import { numAbbr, toPath } from '~/common/utils' + +import styles from './styles.css' + +import { TagDigestConciseTag } from './__generated__/TagDigestConciseTag' + +export type TagDigestConciseTagProps = { + tag: TagDigestConciseTag + textSize?: 'sm' | 'md-s' + showArticlesNum?: boolean +} & CardProps + +const fragments = { + tag: gql` + fragment TagDigestConciseTag on Tag { + id + content + numArticles + } + `, +} + +const Concise = ({ + tag, + textSize = 'md-s', + showArticlesNum, + ...cardProps +}: TagDigestConciseTagProps) => { + const path = toPath({ + page: 'tagDetail', + tag, + }) + + return ( + +
+ } + color="black" + size={textSize} + spacing="xxtight" + weight="md" + > + {tag.content} + + + {showArticlesNum && ( + } + size="xs" + spacing="xxtight" + color="grey-dark" + > + {numAbbr(tag.numArticles)} + + )} +
+ + +
+ ) +} + +Concise.fragments = fragments + +export default Concise diff --git a/src/components/TagDigest/Concise/styles.css b/src/components/TagDigest/Concise/styles.css new file mode 100644 index 0000000000..4dde5124c0 --- /dev/null +++ b/src/components/TagDigest/Concise/styles.css @@ -0,0 +1,5 @@ +.content { + @mixin flex-center-start; + + gap: 0.625rem; +} diff --git a/src/components/TagDigest/index.tsx b/src/components/TagDigest/index.tsx index faae96e758..f5fd06a8db 100644 --- a/src/components/TagDigest/index.tsx +++ b/src/components/TagDigest/index.tsx @@ -1,8 +1,10 @@ +import Concise from './Concise' import Feed from './Feed' import Rich from './Rich' import Sidebar from './Sidebar' export const TagDigest = { + Concise, Rich, Sidebar, Feed, From b6e503a0ce988cdb651212f60279f608f8e1e40f Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:20:55 +0800 Subject: [PATCH 004/244] feat(Storybook): add example --- .../components/TagDigest/Concise.stories.tsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/stories/components/TagDigest/Concise.stories.tsx diff --git a/src/stories/components/TagDigest/Concise.stories.tsx b/src/stories/components/TagDigest/Concise.stories.tsx new file mode 100644 index 0000000000..2f22e4eda7 --- /dev/null +++ b/src/stories/components/TagDigest/Concise.stories.tsx @@ -0,0 +1,24 @@ +import { MockedProvider } from '@apollo/react-testing' +import { ComponentMeta, ComponentStory } from '@storybook/react' +import React from 'react' + +import { TagDigest } from '~/components' + +import { MOCK_TAG } from '../../mocks' + +export default { + title: 'Components/TagDigest/Concise', + component: TagDigest.Concise, +} as ComponentMeta + +const Template: ComponentStory = (args) => ( + + + +) + +export const Default = Template.bind({}) +Default.args = { + tag: MOCK_TAG as any, + showArticlesNum: true, +} From a88f7e4a2e75933ae4c16a8d5d6bbcea49ef87fb Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:21:40 +0800 Subject: [PATCH 005/244] feat(Storybook): add example --- .../components/TagDigest/Rich.stories.tsx | 30 +++++++++++++++++++ src/stories/mocks/index.ts | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 src/stories/components/TagDigest/Rich.stories.tsx diff --git a/src/stories/components/TagDigest/Rich.stories.tsx b/src/stories/components/TagDigest/Rich.stories.tsx new file mode 100644 index 0000000000..ddeec8bef2 --- /dev/null +++ b/src/stories/components/TagDigest/Rich.stories.tsx @@ -0,0 +1,30 @@ +import { MockedProvider } from '@apollo/react-testing' +import { ComponentMeta, ComponentStory } from '@storybook/react' +import React from 'react' + +import { TagDigest } from '~/components' + +import { MOCK_TAG } from '../../mocks' + +export default { + title: 'Components/TagDigest/Rich', + component: TagDigest.Rich, +} as ComponentMeta + +const Template: ComponentStory = (args) => ( + + + +) + +export const Default = Template.bind({}) +Default.args = { + tag: MOCK_TAG as any, +} + +export const HasFollow = Template.bind({}) +HasFollow.args = { + tag: MOCK_TAG as any, + hasDesc: true, + hasFollow: true, +} diff --git a/src/stories/mocks/index.ts b/src/stories/mocks/index.ts index 0551c22826..911d8871fb 100644 --- a/src/stories/mocks/index.ts +++ b/src/stories/mocks/index.ts @@ -167,6 +167,8 @@ export const MOCK_TAG = { editors: [MOCK_USER], owner: MOCK_USER, content: '香港', + description: + '香港(英語:Hong Kong;縮寫:HK/HKG),全稱香港特別行政區(英語:Hong Kong Special Administrative Region;縮寫:HKSAR),簡稱「港」,雅稱「香江」', articles: { __typename: 'ArticleConnection' as any, totalCount: 8, From 12700cde84f75c451836347381119de345e5b954 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:18:47 +0800 Subject: [PATCH 006/244] feat(TagDigest): No longer use in --- src/components/TagDigest/Concise/index.tsx | 57 ++++++++-------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/src/components/TagDigest/Concise/index.tsx b/src/components/TagDigest/Concise/index.tsx index 8b16b7728e..23d1d49aca 100644 --- a/src/components/TagDigest/Concise/index.tsx +++ b/src/components/TagDigest/Concise/index.tsx @@ -1,14 +1,8 @@ import gql from 'graphql-tag' -import { - Card, - CardProps, - IconArticle16, - IconHashTag16, - TextIcon, -} from '~/components' +import { IconArticle16, IconHashTag16, TextIcon } from '~/components' -import { numAbbr, toPath } from '~/common/utils' +import { numAbbr } from '~/common/utils' import styles from './styles.css' @@ -18,7 +12,7 @@ export type TagDigestConciseTagProps = { tag: TagDigestConciseTag textSize?: 'sm' | 'md-s' showArticlesNum?: boolean -} & CardProps +} const fragments = { tag: gql` @@ -34,40 +28,31 @@ const Concise = ({ tag, textSize = 'md-s', showArticlesNum, - ...cardProps }: TagDigestConciseTagProps) => { - const path = toPath({ - page: 'tagDetail', - tag, - }) - return ( - -
+
+ } + color="black" + size={textSize} + spacing="xxtight" + weight="md" + > + {tag.content} + + + {showArticlesNum && ( } - color="black" - size={textSize} + icon={} + size="xs" spacing="xxtight" - weight="md" + color="grey-dark" > - {tag.content} + {numAbbr(tag.numArticles)} - - {showArticlesNum && ( - } - size="xs" - spacing="xxtight" - color="grey-dark" - > - {numAbbr(tag.numArticles)} - - )} -
- + )} - +
) } From dd3e25230e3aaef6cfb6eea0d4c1481d8b3fa6e4 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:20:07 +0800 Subject: [PATCH 007/244] feat(UserDigest): reivse UI --- src/components/UserDigest/Concise/styles.css | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/components/UserDigest/Concise/styles.css b/src/components/UserDigest/Concise/styles.css index 5bef18bf70..b037e6b210 100644 --- a/src/components/UserDigest/Concise/styles.css +++ b/src/components/UserDigest/Concise/styles.css @@ -1,14 +1,5 @@ .container { @mixin flex-center-start; - - &:not(.disabled) { - &:hover, - &:focus { - & .displayname { - text-decoration: underline; - } - } - } } .name { From 37fee495a6f6be560784b5e2efb6bf4da2deaeae Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:49:10 +0800 Subject: [PATCH 008/244] feat(Search): add --- .../TriggerFullSearchItem.tsx | 33 ++++++ .../Search/SearchQuickResult/gql.ts | 34 ++++++ .../Search/SearchQuickResult/index.tsx | 110 ++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 src/components/Search/SearchQuickResult/TriggerFullSearchItem.tsx create mode 100644 src/components/Search/SearchQuickResult/gql.ts create mode 100644 src/components/Search/SearchQuickResult/index.tsx diff --git a/src/components/Search/SearchQuickResult/TriggerFullSearchItem.tsx b/src/components/Search/SearchQuickResult/TriggerFullSearchItem.tsx new file mode 100644 index 0000000000..f9423f75fb --- /dev/null +++ b/src/components/Search/SearchQuickResult/TriggerFullSearchItem.tsx @@ -0,0 +1,33 @@ +import { IconArrowRight16, Menu, TextIcon, Translate } from '~/components' + +import { toPath } from '~/common/utils' + +interface TriggerFullSearchItemProps { + searchKey: string +} + +const TriggerFullSearchItem = ({ searchKey }: TriggerFullSearchItemProps) => { + return ( + + } + color="green" + weight="md" + textPlacement="left" + > + + + + ) +} + +export default TriggerFullSearchItem diff --git a/src/components/Search/SearchQuickResult/gql.ts b/src/components/Search/SearchQuickResult/gql.ts new file mode 100644 index 0000000000..a5266bb950 --- /dev/null +++ b/src/components/Search/SearchQuickResult/gql.ts @@ -0,0 +1,34 @@ +import gql from 'graphql-tag' + +// TODO: Why this line don't work +// import { TagDigest, UserDigest } from '~/components' + +import { TagDigest } from '~/components/TagDigest' +import { UserDigest } from '~/components/UserDigest' + +export const QUICK_RESULT = gql` + query QuickResult($key: String!) { + user: search(input: { key: $key, type: User, first: 5 }) { + edges { + cursor + node { + ... on User { + ...UserDigestConciseUser + } + } + } + } + tag: search(input: { key: $key, type: Tag, first: 5 }) { + edges { + cursor + node { + ... on Tag { + ...TagDigestConciseTag + } + } + } + } + } + ${UserDigest.Concise.fragments.user} + ${TagDigest.Concise.fragments.tag} +` diff --git a/src/components/Search/SearchQuickResult/index.tsx b/src/components/Search/SearchQuickResult/index.tsx new file mode 100644 index 0000000000..8f3caaddac --- /dev/null +++ b/src/components/Search/SearchQuickResult/index.tsx @@ -0,0 +1,110 @@ +import { useLazyQuery } from '@apollo/react-hooks' +import { Fragment, useEffect } from 'react' + +import { + Menu, + Spinner, + TagDigest, + UserDigest, + useResponsive, +} from '~/components' + +import { toPath } from '~/common/utils' + +import { QUICK_RESULT } from './gql' +import TriggerFullSearchItem from './TriggerFullSearchItem' + +import { QuickResult } from './__generated__/QuickResult' + +interface QuickSearchProps { + searchKey: string + inPage?: boolean +} + +export const SearchQuickResult = (props: QuickSearchProps) => { + const { searchKey, inPage } = props + const isSmallUp = useResponsive('sm-up') + const [getQuickResult, { data, loading }] = useLazyQuery( + QUICK_RESULT, + { + variables: { key: searchKey }, + } + ) + + const { edges: userEdges } = data?.user || {} + const { edges: tagEdges } = data?.tag || {} + + useEffect(() => { + getQuickResult() + }, [searchKey]) + + if (loading) { + return ( + + + + ) + } + + if ( + (!userEdges || userEdges.length <= 0) && + (!tagEdges || tagEdges.length <= 0) + ) { + return null + } + + return ( + + {!isSmallUp && ( + <> + + + + )} + {userEdges && + userEdges.length > 0 && + userEdges.map( + ({ node, cursor }, i) => + node.__typename === 'User' && ( + + + + + + ) + )} + {userEdges && userEdges.length > 0 && tagEdges && tagEdges.length > 0 && ( + + )} + {tagEdges && + tagEdges.length > 0 && + tagEdges.map( + ({ node, cursor }, i) => + node.__typename === 'Tag' && ( + + + + + + ) + )} + + ) +} From 0467b78f79c8b15c2ec9be340ce0d5da32a1f66a Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 20:16:25 +0800 Subject: [PATCH 009/244] feat(Search): export Search Quick Result --- src/components/Search/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index faa77bfaec..9b5878931c 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -1,3 +1,4 @@ export * from './SearchBar' export * from './SearchAutoComplete' export * from './SearchOverview' +export * from './SearchQuickResult' From 328b47216c3da8ce2a20212cae8d7c7da8c56a9e Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 20:39:20 +0800 Subject: [PATCH 010/244] feat(SearchBar): use quickResult instead of autoComplete & update placeholder copy --- src/components/Search/SearchBar/index.tsx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/components/Search/SearchBar/index.tsx b/src/components/Search/SearchBar/index.tsx index a66d790353..1dd4ce95d5 100644 --- a/src/components/Search/SearchBar/index.tsx +++ b/src/components/Search/SearchBar/index.tsx @@ -7,8 +7,7 @@ import { Dropdown, IconSearch16, LanguageContext, - SearchAutoComplete, - SearchOverview, + SearchQuickResult, useRoute, } from '~/components' @@ -46,12 +45,7 @@ export const SearchBar: React.FC = ({ const [search, setSearch] = useState('') const [debouncedSearch] = useDebounce(search, INPUT_DEBOUNCE) const textAriaLabel = translate({ id: 'search', lang }) - const textPlaceholder = translate({ - zh_hant: '搜尋作品、標籤、作者', - zh_hans: '搜索作品、标签、作者', - en: 'Search articles, tags and authors', - lang, - }) + const textPlaceholder = translate({ id: 'search', lang }) // dropdown const [showDropdown, setShowDropdown] = useState(false) @@ -110,10 +104,8 @@ export const SearchBar: React.FC = ({ - ) : ( - - ) + + ) : null } trigger={undefined} appendTo={typeof window !== 'undefined' ? document.body : undefined} From 2667fba8cb7a48c300dc8c419add6b56edeeb55b Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 5 Dec 2022 21:00:54 +0800 Subject: [PATCH 011/244] feat(TagDigest): revise style --- src/components/TagDigest/Concise/styles.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/TagDigest/Concise/styles.css b/src/components/TagDigest/Concise/styles.css index 4dde5124c0..8e95ee81d6 100644 --- a/src/components/TagDigest/Concise/styles.css +++ b/src/components/TagDigest/Concise/styles.css @@ -1,5 +1,5 @@ .content { - @mixin flex-center-start; - - gap: 0.625rem; + & :global(span + span) { + margin-left: 0.625rem; + } } From 6d5bb5ac023f0271cff734c7f7da954c19e08c2b Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Tue, 6 Dec 2022 13:53:58 +0800 Subject: [PATCH 012/244] feat(Search): Quick result searching on second character, except search key starts with @ or # then on third character and end at 10 characters --- src/components/Search/SearchQuickResult/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Search/SearchQuickResult/index.tsx b/src/components/Search/SearchQuickResult/index.tsx index 8f3caaddac..3d06588d0a 100644 --- a/src/components/Search/SearchQuickResult/index.tsx +++ b/src/components/Search/SearchQuickResult/index.tsx @@ -35,6 +35,15 @@ export const SearchQuickResult = (props: QuickSearchProps) => { const { edges: tagEdges } = data?.tag || {} useEffect(() => { + if (searchKey.length < 2) return + + if ( + '@#@#'.includes(searchKey[0]) && + (searchKey.length < 3 || searchKey.length > 10) + ) { + return + } + getQuickResult() }, [searchKey]) From 7098a7303640c85f245565f1681ae50831df9d9a Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:13:54 +0800 Subject: [PATCH 013/244] feat(Layout): show of aside in search page --- src/components/Layout/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index a0a0f22479..44f8acbc63 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -67,7 +67,6 @@ const Main: React.FC> = ({ children, }) => { const { isInPath, isPathStartWith } = useRoute() - const isInSearch = isInPath('SEARCH') const isInSettings = isInPath('SETTINGS') const isInArticleDetail = isInPath('ARTICLE_DETAIL') const isInCircle = isPathStartWith('/~', true) @@ -104,7 +103,7 @@ const Main: React.FC> = ({