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

Commit 7c7c337

Browse files
committed
chore: clean up React dev warning
1 parent 6a1a0af commit 7c7c337

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

src/containers/unit/ModeLine/TopBar/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ const Topbar = (props) => {
1111
useEffect(() => {
1212
if (isMobile) {
1313
CurTopBar = dynamic(() => import('./MobileView/index'), { ssr: false })
14-
} else {
15-
CurTopBar = dynamic(() => import('./DesktopView'), { ssr: false })
1614
}
15+
// else {
16+
// CurTopBar = dynamic(() => import('./DesktopView'), { ssr: false })
17+
// }
1718
}, [isMobile])
1819

1920
return (

src/containers/unit/TagsBar/DesktopView/Folder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const Folder = ({ title, groupTags, allTags, activeTag, onSelect }) => {
6565
/>
6666
<Title>{title}</Title>
6767
{!isFolderOpen && isActiveTagInFolder && (
68-
<TagItem tag={activeTag} active isInline />
68+
<TagItem tag={activeTag} active inline />
6969
)}
7070
</Header>
7171

src/containers/unit/TagsBar/DesktopView/TagItem.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ import {
1414

1515
import { onTagSelect } from '../logic'
1616

17-
const TagItem = ({ tag, active, activeId, isInline, onSelect }) => {
17+
const TagItem = ({ tag, active, activeId, inline, onSelect }) => {
1818
return (
19-
<Wrapper active={active} isInline={isInline}>
19+
<Wrapper active={active} inline={inline}>
2020
<HashSign
2121
color={tag.color}
2222
active={active}
2323
activeId={activeId}
24-
isInline={isInline}
24+
inline={inline}
2525
/>
2626

2727
<TagTitle
2828
active={active}
29-
isInline={isInline}
29+
inline={inline}
3030
onClick={() => onTagSelect(tag, onSelect)}
3131
>
3232
{Trans(tag.title)}
3333
</TagTitle>
3434
<SpaceGrow />
3535

36-
{!isInline && (
36+
{!inline && (
3737
<CountInfoWrapper>
3838
<TagCount num={getRandomInt(5, 1000)} />
3939
</CountInfoWrapper>

src/containers/unit/TagsBar/styles/desktop_view/tag_item.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import { TagsWrapper } from './index'
88

99
export const Wrapper = styled.div`
1010
${css.flex('align-center')};
11-
margin-bottom: ${({ isInline }) => (!isInline ? '5px' : 0)};
12-
padding: ${({ isInline }) => (!isInline ? '5px' : 0)};
11+
margin-bottom: ${({ inline }) => (!inline ? '5px' : 0)};
12+
padding: ${({ inline }) => (!inline ? '5px' : 0)};
1313
max-width: 180px;
1414
border-radius: 5px;
1515
16-
background: ${({ active, isInline }) =>
17-
!active || isInline ? 'transparent' : '#0e303d'};
16+
background: ${({ active, inline }) =>
17+
!active || inline ? 'transparent' : '#0e303d'};
1818
1919
&:hover {
20-
background: ${({ isInline }) => (!isInline ? '#0e303d' : 'none')};
20+
background: ${({ inline }) => (!inline ? '#0e303d' : 'none')};
2121
}
2222
`
2323
export const AllTagIcon = styled(Img)`
@@ -36,19 +36,19 @@ export const HashSign = styled(HashTagSVG)`
3636
fill: ${({ active, color, activeId }) =>
3737
getActiveColor(active, color, activeId)};
3838
${css.size(14)};
39-
margin-right: ${({ isInline }) => (!isInline ? '12px' : '3px')};
39+
margin-right: ${({ inline }) => (!inline ? '12px' : '3px')};
4040
opacity: ${theme('tags.dotOpacity')};
4141
4242
transform: rotate(18deg);
4343
`
4444
export const TagTitle = styled.div`
4545
color: ${theme('tags.text')};
46-
font-size: ${({ isInline }) => (!isInline ? '14.5px' : '13px')};
46+
font-size: ${({ inline }) => (!inline ? '14.5px' : '13px')};
4747
opacity: 0.9;
4848
letter-spacing: 2px;
4949
font-weight: ${({ active }) => (active ? 'bold' : 'normal')};
5050
opacity: ${({ active }) => (active ? 1 : 0.9)};
51-
${({ isInline }) => (!isInline ? css.cutFrom('120px') : css.cutFrom('50px'))};
51+
${({ inline }) => (!inline ? css.cutFrom('120px') : css.cutFrom('50px'))};
5252
5353
&:hover {
5454
cursor: pointer;

0 commit comments

Comments
 (0)