Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/components/Buttons/OrButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import HorizontalButton from './HorizontalButton'
import VerticalButton from './VerticalButton'

export type TProps = {
direction: 'row' | 'column'
direction?: 'row' | 'column'
size?: TSIZE_SM
activeKey: string
onClick: (key: string) => void
group: {
key: string
title: string
}[]
children: React.ReactNode
}

const OrButton: React.FC<TProps> = ({ direction, ...restProps }) => {
const OrButton: React.FC<TProps> = ({ direction = 'row', ...restProps }) => {
return direction === 'row' ? (
<HorizontalButton {...restProps} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/NaviCatalog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type TProps = {
testid?: string
items: TMenuItem[]

onSelect: (id: string, type: string) => void
onSelect?: (id: string, type: string) => void
onShowMore?: () => void
}

Expand Down
119 changes: 0 additions & 119 deletions src/containers/content/WorksContent/Banner/Backgrounds.js

This file was deleted.

91 changes: 0 additions & 91 deletions src/containers/content/WorksContent/Banner/Recommendation.js

This file was deleted.

73 changes: 0 additions & 73 deletions src/containers/content/WorksContent/Banner/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import React from 'react'

import { Wrapper, Title, Desc } from './styles/brand'

const Brand = () => {
type TProps = {
testid?: string
}

const Brand: React.FC<TProps> = ({ testid = 'works-content-brand' }) => {
return (
<Wrapper>
<Wrapper testid={testid}>
<Title>作品集市</Title>
<Desc>by makers, for makers.</Desc>
</Wrapper>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'

import { mockNaviCatalogMenu } from '@/utils'

import { Br } from '@/components/Common'
import { OrButton } from '@/components/Buttons'
import FiltersMenu from '@/components/FiltersMenu'
Expand All @@ -12,12 +14,15 @@ import { Wrapper, FilterWrapper } from './styles/filter_bar'

import { changeView } from './logic'

const FilterBar = ({ activeView }) => {
type TProps = {
activeView: string
}

const FilterBar: React.FC<TProps> = ({ activeView }) => {
return (
<Wrapper>
<OrButton
size="small"
type="primary"
activeKey={activeView}
group={[
{
Expand All @@ -26,14 +31,18 @@ const FilterBar = ({ activeView }) => {
},
{
key: VIEW.MILESTONE,
title: '动态',
title: '动态', // 里面再成 里程碑,和讨论
},
]}
onClick={changeView}
/>
<Br bottom={30} />
<FilterWrapper>
<NaviCatalog title="类别筛选" withDivider={false} />
<NaviCatalog
title="类别筛选"
withDivider={false}
items={mockNaviCatalogMenu()}
/>
</FilterWrapper>
<Br bottom={40} />
<FilterWrapper>
Expand Down
Loading