Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commitbebefa1

Browse files
authored
chore(js-ts): WorksContent && fix warnigns & ideas (#1052)
1 parent8f8a802 commitbebefa1

File tree

25 files changed

+90
-542
lines changed

25 files changed

+90
-542
lines changed

‎src/components/Buttons/OrButton/index.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ import HorizontalButton from './HorizontalButton'
66
importVerticalButtonfrom'./VerticalButton'
77

88
exporttypeTProps={
9-
direction:'row'|'column'
9+
direction?:'row'|'column'
1010
size?:TSIZE_SM
1111
activeKey:string
1212
onClick:(key:string)=>void
1313
group:{
1414
key:string
1515
title:string
1616
}[]
17-
children:React.ReactNode
1817
}
1918

20-
constOrButton:React.FC<TProps>=({ direction, ...restProps})=>{
19+
constOrButton:React.FC<TProps>=({ direction='row', ...restProps})=>{
2120
returndirection==='row' ?(
2221
<HorizontalButton{...restProps}/>
2322
) :(

‎src/components/NaviCatalog/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type TProps = {
3939
testid?:string
4040
items:TMenuItem[]
4141

42-
onSelect:(id:string,type:string)=>void
42+
onSelect?:(id:string,type:string)=>void
4343
onShowMore?:()=>void
4444
}
4545

‎src/containers/content/WorksContent/Banner/Backgrounds.js‎

Lines changed: 0 additions & 119 deletions
This file was deleted.

‎src/containers/content/WorksContent/Banner/Recommendation.js‎

Lines changed: 0 additions & 91 deletions
This file was deleted.

‎src/containers/content/WorksContent/Banner/index.js‎

Lines changed: 0 additions & 73 deletions
This file was deleted.

‎src/containers/content/WorksContent/Brand.js‎renamed to ‎src/containers/content/WorksContent/Brand.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import React from 'react'
22

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

5-
constBrand=()=>{
5+
typeTProps={
6+
testid?:string
7+
}
8+
9+
constBrand:React.FC<TProps>=({ testid='works-content-brand'})=>{
610
return(
7-
<Wrapper>
11+
<Wrappertestid={testid}>
812
<Title>作品集市</Title>
913
<Desc>by makers, for makers.</Desc>
1014
</Wrapper>

‎src/containers/content/WorksContent/FilterBar.js‎renamed to ‎src/containers/content/WorksContent/FilterBar.tsx‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
importReactfrom'react'
22

3+
import{mockNaviCatalogMenu}from'@/utils'
4+
35
import{Br}from'@/components/Common'
46
import{OrButton}from'@/components/Buttons'
57
importFiltersMenufrom'@/components/FiltersMenu'
@@ -12,12 +14,15 @@ import { Wrapper, FilterWrapper } from './styles/filter_bar'
1214

1315
import{changeView}from'./logic'
1416

15-
constFilterBar=({ activeView})=>{
17+
typeTProps={
18+
activeView:string
19+
}
20+
21+
constFilterBar:React.FC<TProps>=({ activeView})=>{
1622
return(
1723
<Wrapper>
1824
<OrButton
1925
size="small"
20-
type="primary"
2126
activeKey={activeView}
2227
group={[
2328
{
@@ -26,14 +31,18 @@ const FilterBar = ({ activeView }) => {
2631
},
2732
{
2833
key:VIEW.MILESTONE,
29-
title:'动态',
34+
title:'动态',// 里面再成 里程碑,和讨论
3035
},
3136
]}
3237
onClick={changeView}
3338
/>
3439
<Brbottom={30}/>
3540
<FilterWrapper>
36-
<NaviCatalogtitle="类别筛选"withDivider={false}/>
41+
<NaviCatalog
42+
title="类别筛选"
43+
withDivider={false}
44+
items={mockNaviCatalogMenu()}
45+
/>
3746
</FilterWrapper>
3847
<Brbottom={40}/>
3948
<FilterWrapper>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp