Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 2bd852f

Browse files
committed
Merge branch 'uid' into dev
2 parents 4941c2d + 28f0a4a commit 2bd852f

File tree

35 files changed

+64
-79
lines changed

35 files changed

+64
-79
lines changed

components/AvatarsRow/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ATATARS_LIST_LENGTH } from '../../config/general'
1313

1414
import { Avatars, AvatarsItem, AvatarsImg, AvatarsMore } from './styles'
1515

16-
import { makeDebugger, prettyNum, uid } from '../../utils'
16+
import { makeDebugger, prettyNum } from '../../utils'
1717

1818
/* eslint-disable no-unused-vars */
1919
const debug = makeDebugger('c:AvatarsRow:index')
@@ -48,7 +48,7 @@ const AvatarsRow = ({
4848
)}
4949

5050
{R.slice(0, limit, users).map(user => (
51-
<AvatarsItem key={uid.gen()} onClick={onUserSelect.bind(this, user)}>
51+
<AvatarsItem key={user.id} onClick={onUserSelect.bind(this, user)}>
5252
<Tooltip title={user.nickname}>
5353
<AvatarsImg src={user.avatar} />
5454
</Tooltip>

components/CommunityList/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import R from 'ramda'
1111
import Popover from '../Popover'
1212
import { Wrapper, Logo, PopoverInfo } from './styles'
1313

14-
import { uid, makeDebugger } from '../../utils'
14+
import { makeDebugger } from '../../utils'
1515

1616
/* eslint-disable no-unused-vars */
1717
const debug = makeDebugger('c:CommunityList:index')
@@ -28,7 +28,7 @@ const CommunityList = ({ items, emptyHint }) => {
2828
<Wrapper>
2929
{items.map(community => (
3030
<Popover
31-
key={uid.gen()}
31+
key={community.id}
3232
placement="bottom"
3333
trigger="hover"
3434
content={<PopoverInfo>{community.title}</PopoverInfo>}

components/ContentFilter/JobEducationFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
SelectItem,
1212
} from './styles'
1313

14-
import { uid } from '../../utils'
14+
// import { uid } from '../../utils'
1515

1616
const JobEducationFilter = ({ activeFilter, onSelect }) => (
1717
<ColumnWrapper>
@@ -23,7 +23,7 @@ const JobEducationFilter = ({ activeFilter, onSelect }) => (
2323

2424
{LABEL_POOL.education.data.map(item => (
2525
<SelectItem
26-
key={uid.gen()}
26+
key={item}
2727
active={activeFilter.jobEducation === item}
2828
onClick={onSelect.bind(this, { jobEducation: item })}
2929
>

components/ContentFilter/JobExpFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SelectItem,
1313
} from './styles'
1414

15-
import { uid } from '../../utils'
15+
// import { uid } from '../../utils'
1616

1717
const JobExpFilter = ({ activeFilter, onSelect }) => (
1818
<ColumnWrapper>
@@ -25,7 +25,7 @@ const JobExpFilter = ({ activeFilter, onSelect }) => (
2525
<LeftAlignWrapper>
2626
{LABEL_POOL.exp.data.map(item => (
2727
<SelectItem
28-
key={uid.gen()}
28+
key={item}
2929
active={activeFilter.jobExp === item}
3030
onClick={onSelect.bind(this, { jobExp: item })}
3131
>

components/ContentFilter/JobFieldFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SelectItem,
1313
} from './styles'
1414

15-
import { uid } from '../../utils'
15+
// import { uid } from '../../utils'
1616

1717
const JobFieldFilter = ({ activeFilter, onSelect }) => (
1818
<ColumnWrapper>
@@ -24,7 +24,7 @@ const JobFieldFilter = ({ activeFilter, onSelect }) => (
2424
<LeftAlignWrapper>
2525
{LABEL_POOL.field.data.map(item => (
2626
<SelectItem
27-
key={uid.gen()}
27+
key={item}
2828
active={activeFilter.jobField === item}
2929
onClick={onSelect.bind(this, { jobField: item })}
3030
>

components/ContentFilter/JobFinaceFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SelectItem,
1313
} from './styles'
1414

15-
import { uid } from '../../utils'
15+
// import { uid } from '../../utils'
1616

1717
const JobFinaceFilter = ({ activeFilter, onSelect }) => (
1818
<ColumnWrapper>
@@ -25,7 +25,7 @@ const JobFinaceFilter = ({ activeFilter, onSelect }) => (
2525
<LeftAlignWrapper>
2626
{LABEL_POOL.finance.data.map(item => (
2727
<SelectItem
28-
key={uid.gen()}
28+
key={item}
2929
active={activeFilter.jobFinace === item}
3030
onClick={onSelect.bind(this, { jobFinace: item })}
3131
>

components/ContentFilter/JobSalaryFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SelectItem,
1313
} from './styles'
1414

15-
import { uid } from '../../utils'
15+
// import { uid } from '../../utils'
1616

1717
const JobSalaryFilter = ({ activeFilter, onSelect }) => (
1818
<ColumnWrapper>
@@ -25,7 +25,7 @@ const JobSalaryFilter = ({ activeFilter, onSelect }) => (
2525
<LeftAlignWrapper>
2626
{LABEL_POOL.salary.data.map(item => (
2727
<SelectItem
28-
key={uid.gen()}
28+
key={item}
2929
active={activeFilter.jobSalary === item}
3030
onClick={onSelect.bind(this, { jobSalary: item })}
3131
>

components/ContentFilter/JobScaleFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SelectItem,
1313
} from './styles'
1414

15-
import { uid } from '../../utils'
15+
// import { uid } from '../../utils'
1616

1717
const JobScaleFilter = ({ activeFilter, onSelect }) => (
1818
<ColumnWrapper>
@@ -25,7 +25,7 @@ const JobScaleFilter = ({ activeFilter, onSelect }) => (
2525
<LeftAlignWrapper>
2626
{LABEL_POOL.scale.data.map(item => (
2727
<SelectItem
28-
key={uid.gen()}
28+
key={item}
2929
active={activeFilter.jobScale === item}
3030
onClick={onSelect.bind(this, { jobScale: item })}
3131
>

components/ContentSourceCard/TagList.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import R from 'ramda'
33

44
import { Wrapper, TagDot, TagTitle, NomoreDesc } from './styles/tag_list'
55

6-
import { uid } from '../../utils'
7-
86
const TagList = ({ items }) => {
97
if (R.isEmpty(items)) return <NomoreDesc>无标签</NomoreDesc>
108

119
return (
1210
<React.Fragment>
1311
{items.map(t => (
14-
<Wrapper key={uid.gen()}>
12+
<Wrapper key={t.id}>
1513
<TagDot color={t.color} />
1614
<TagTitle>{t.title}</TagTitle>
1715
</Wrapper>

components/ContentSourceCard/UserList.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import React from 'react'
22

33
import Popover from '../Popover'
44
import { Wrapper, Avatar, PopInfo } from './styles/user_list'
5-
import { uid } from '../../utils'
65

76
const UserList = ({ items }) => (
87
<Wrapper>
98
{items.map(user => (
109
<Popover
11-
key={uid.gen()}
10+
key={user.id}
1211
placement="bottom"
1312
trigger="hover"
1413
content={<PopInfo>{user.nickname}</PopInfo>}

0 commit comments

Comments
 (0)