1
- import React from 'react'
1
+ import { FC , memo } from 'react'
2
2
3
+ import type { TCommunity } from '@/spec'
3
4
import { ICON_CMD , EMAIL_SUPPORT } from '@/config'
4
5
import { TYPE } from '@/constant'
5
6
7
+ import NoticeBar from '@/widgets/NoticeBar'
8
+
6
9
import {
7
10
Wrapper ,
8
11
Title ,
9
12
DescLabel ,
10
13
DescIcon ,
11
- EditorIcon ,
12
14
DescText ,
13
15
DescLink ,
14
16
} from './styles/header_info'
15
17
16
- const HeaderInfo = ( { type, totalCount, brief, curCommunity} ) => {
18
+ type TProps = {
19
+ type :string
20
+ totalCount :number
21
+ curCommunity :TCommunity
22
+ }
23
+
24
+ const HeaderInfo :FC < TProps > = ( { type, totalCount, curCommunity} ) => {
17
25
switch ( type ) {
18
26
case TYPE . USER_LISTER_FAVORITES :
19
27
return (
@@ -24,7 +32,7 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
24
32
</ Title >
25
33
< DescLabel >
26
34
< DescIcon src = { `${ ICON_CMD } /paper.svg` } />
27
- < DescText > { brief } </ DescText >
35
+ < DescText > -- </ DescText >
28
36
</ DescLabel >
29
37
</ Wrapper >
30
38
)
@@ -38,7 +46,7 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
38
46
</ Title >
39
47
< DescLabel >
40
48
< DescIcon src = { `${ ICON_CMD } /paper.svg` } />
41
- < DescText > { brief } </ DescText >
49
+ < DescText > -- </ DescText >
42
50
</ DescLabel >
43
51
</ Wrapper >
44
52
)
@@ -51,7 +59,7 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
51
59
人)
52
60
</ Title >
53
61
< DescLabel >
54
- < DescText > 关注{ brief } 的人</ DescText >
62
+ < DescText > 关注-- 的人</ DescText >
55
63
</ DescLabel >
56
64
</ Wrapper >
57
65
)
@@ -64,7 +72,7 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
64
72
人)
65
73
</ Title >
66
74
< DescLabel >
67
- < DescText > { brief } 关注的人</ DescText >
75
+ < DescText > -- 关注的人</ DescText >
68
76
</ DescLabel >
69
77
</ Wrapper >
70
78
)
@@ -73,11 +81,11 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
73
81
return (
74
82
< Wrapper >
75
83
< Title >
76
- 关注中 ({ totalCount }
84
+ 已加入 ({ totalCount }
77
85
人)
78
86
</ Title >
79
87
< DescLabel >
80
- < DescText > 关注 { brief } 社区的人 </ DescText >
88
+ < DescText > 他们加入了 { curCommunity . title } 社区 </ DescText >
81
89
</ DescLabel >
82
90
</ Wrapper >
83
91
)
@@ -86,20 +94,22 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
86
94
return (
87
95
< Wrapper >
88
96
< Title >
89
- { brief } 社区编辑 ({ totalCount }
97
+ { curCommunity . title } 社区志愿者 ({ totalCount }
90
98
人)
91
99
</ Title >
100
+ < NoticeBar
101
+ type = "info"
102
+ content = "志愿者为具有对应社区日常管理权限的用户,如果有你认为合适的人选,欢迎推荐或自荐 🙏🏻 。"
103
+ bottom = { 15 }
104
+ left = { - 6 }
105
+ noBg
106
+ />
92
107
< DescLabel >
93
- < EditorIcon src = { `${ ICON_CMD } /co_editor.svg` } />
94
- < DescText >
95
- { brief } 社区编辑面向所有用户开放,
96
- < DescLink
97
- href = { `mailto:${ EMAIL_SUPPORT } ?subject=申请成为${ curCommunity . raw } 社区编辑&body=感谢您的关注,成为社区编辑后,您将获得本社区范围内各种内容的删帖管理等权限,协助社区的健康发展. 因此本着对社区成员负责任的态度,我需要知道关于你的以下信息 (最终正文请删除本行): %0A%0A%0A你是谁? (包括但不限于 weibo / zhihu / jianshu / twitter 等社交账号) %0A%0A%0A你做过什么? (包括但不限于 github / stackoverflow / 个人网站(博客) 等技术社区账号) %0A%0A%0A你在 coderplanets 上的账号是?` }
98
- >
99
- 申请成为社区编辑
100
- </ DescLink >
101
- 。
102
- </ DescText >
108
+ < DescLink
109
+ href = { `mailto:${ EMAIL_SUPPORT } ?subject=申请成为${ curCommunity . raw } 社区编辑&body=感谢您的关注,成为社区编辑后,您将获得本社区范围内各种内容的删帖管理等权限,协助社区的健康发展. 因此本着对社区成员负责任的态度,我需要知道关于你的以下信息 (最终正文请删除本行): %0A%0A%0A你是谁? (包括但不限于 weibo / zhihu / jianshu / twitter 等社交账号) %0A%0A%0A你做过什么? (包括但不限于 github / stackoverflow / 个人网站(博客) 等技术社区账号) %0A%0A%0A你在 coderplanets 上的账号是?` }
110
+ >
111
+ 申请成为社区志愿者
112
+ </ DescLink >
103
113
</ DescLabel >
104
114
</ Wrapper >
105
115
)
@@ -109,4 +119,4 @@ const HeaderInfo = ({ type, totalCount, brief, curCommunity }) => {
109
119
}
110
120
}
111
121
112
- export default React . memo ( HeaderInfo )
122
+ export default memo ( HeaderInfo )