Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed subcategory layout #3984

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions packages/ui/src/app/pages/Forum/ForumCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import styled from 'styled-components'
import { ForumThreadOrderByInput } from '@/common/api/queries'
import { TransactionButton } from '@/common/components/buttons/TransactionButton'
import { EmptyPagePlaceholder } from '@/common/components/EmptyPagePlaceholder/EmptyPagePlaceholder'
import { HorizontalScroller } from '@/common/components/HorizontalScroller/HorizontalScroller'
import { PlusIcon } from '@/common/components/icons/PlusIcon'
import { ItemCount } from '@/common/components/ItemCount'
import { Loading } from '@/common/components/Loading'
Expand All @@ -17,6 +18,7 @@ import { useRefetchQueries } from '@/common/hooks/useRefetchQueries'
import { useSort } from '@/common/hooks/useSort'
import { MILLISECONDS_PER_BLOCK } from '@/common/model/formatters'
import { ForumCategoryList } from '@/forum/components/category/ForumCategoryList'
import { CategoryCard } from '@/forum/components/CategoryCard/CategoryCard'
import { ForumPageHeader } from '@/forum/components/ForumPageHeader'
import { ThreadFilters } from '@/forum/components/threads/ThreadFilters'
import { ThreadList } from '@/forum/components/threads/ThreadList'
Expand Down Expand Up @@ -99,13 +101,15 @@ export const ForumCategory = () => {
<>
{!!category.subcategories.length && (
<RowGapBlock gap={24}>
<ItemCount count={category.subcategories.length}>
{isArchive ? 'Archived categories' : 'Categories'}
</ItemCount>
<ForumCategoryList categories={category.subcategories} isArchive={isArchive} />
<HorizontalScroller
title={isArchive ? 'Archived categories' : 'Categories'}
items={category.subcategories.map((category) => (
<CategoryCard key={category.id} category={category} />
))}
count={category.subcategories.length}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

design shows 2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this problem and updated it. please check it again.

/>
</RowGapBlock>
)}

<RowGapBlock gap={24}>
<ThreadFilters onApply={(filters) => refresh({ filters })} isArchive={isArchive}>
<ItemCount count={threadCount} size="xs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const StyledBadge = styled(Link)`

const Box = styled(Link)<{ archivedStyles?: boolean; ignoreHover?: boolean }>`
display: flex;
flex: 50%;
column-gap: 15px;
border: 1px solid ${Colors.Black[100]};
border-radius: ${BorderRad.s};
Expand Down