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
4 changes: 2 additions & 2 deletions src/components/AlertBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import { buildLog } from '@/utils'

Expand All @@ -17,7 +17,7 @@ type TProps = {
children: React.ReactNode
}

const AlertBar: React.FC<TProps> = ({ children }) => {
const AlertBar: FC<TProps> = ({ children }) => {
return <Wrapper testid="alertBar">{children}</Wrapper>
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/AvatarsRow/MoreItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import { prettyNum } from '@/utils'
import { Br } from '@/components/Common'
Expand All @@ -21,7 +21,7 @@ type TProps = Pick<
'size' | 'total' | 'showTotalNumber' | 'onTotalSelect'
>

const MoreItem: React.FC<TProps> = ({
const MoreItem: FC<TProps> = ({
size,
total,
onTotalSelect,
Expand Down
4 changes: 2 additions & 2 deletions src/components/AvatarsRow/RealAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import type { TUser } from '@/spec'
import Tooltip from '@/components/Tooltip'
Expand All @@ -20,7 +20,7 @@ type TProps = {
onUserSelect: (user: TUser) => void
}

const RealAvatar: React.FC<TProps> = ({ user, size, onUserSelect }) => {
const RealAvatar: FC<TProps> = ({ user, size, onUserSelect }) => {
return (
<Tooltip
content={<UserPopContent>{user.nickname}</UserPopContent>}
Expand Down
4 changes: 2 additions & 2 deletions src/components/AvatarsRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'
import { compose, not, isNil, filter, reverse as reverseFn, slice } from 'ramda'
import { trackWindowScroll } from 'react-lazy-load-image-component'

Expand Down Expand Up @@ -52,7 +52,7 @@ export type TProps = {
onTotalSelect: () => void
}

const AvatarsRow: React.FC<TProps> = ({
const AvatarsRow: FC<TProps> = ({
size = SIZE.SMALL,
total,
users = [],
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/ArrowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React, { useRef, useState, useEffect } from 'react'
import React, { FC, useRef, useState, useEffect } from 'react'

import type { TSIZE } from '@/spec'
import { ICON } from '@/config'
Expand All @@ -26,7 +26,7 @@ type TProps = {
arrowStyle?: 'default' | 'simple'
}

const ArrowButton: React.FC<TProps> = ({
const ArrowButton: FC<TProps> = ({
children = '下一步',
onClick = log,
size = SIZE.SMALL,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/ArrowLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import type { TSIZE } from '@/spec'
import { ICON_CMD } from '@/config'
Expand All @@ -26,7 +26,7 @@ type TProps = {
hoverColor?: string
}

const ArrowLink: React.FC<TProps> = ({
const ArrowLink: FC<TProps> = ({
className = '',
children = '下一步',
size = SIZE.SMALL,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'
import React, { FC, useEffect, useState } from 'react'

import type { TSIZE_TSM } from '@/spec'
import { SIZE } from '@/constant'
Expand Down Expand Up @@ -33,7 +33,7 @@ type TProps = {
disabled?: boolean
}

const Button: React.FC<TProps> = ({
const Button: FC<TProps> = ({
children = 'button',
ghost = false,
type = 'primary',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/OrButton/HorizontalButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import type { TProps as TButtonProps } from './index'
import { SIZE } from '@/constant'
Expand All @@ -12,7 +12,7 @@ import {

type TProps = Omit<TButtonProps, 'direction'>

const HorizontalButton: React.FC<TProps> = ({
const HorizontalButton: FC<TProps> = ({
onClick,
size = SIZE.SMALL,
activeKey,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/OrButton/VerticalButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import type { TProps as TButtonProps } from './index'
import { SIZE } from '@/constant'
Expand All @@ -12,7 +12,7 @@ import {

type TProps = Omit<TButtonProps, 'direction'>

const VerticalButton: React.FC<TProps> = ({
const VerticalButton: FC<TProps> = ({
onClick,
size = SIZE.SMALL,
activeKey,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/OrButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import type { TSIZE_SM } from '@/spec'

Expand All @@ -16,7 +16,7 @@ export type TProps = {
}[]
}

const OrButton: React.FC<TProps> = ({ direction = 'row', ...restProps }) => {
const OrButton: FC<TProps> = ({ direction = 'row', ...restProps }) => {
return direction === 'row' ? (
<HorizontalButton {...restProps} />
) : (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/YesOrNoButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import { Space } from '@/components/Common'
import Button from './Button'
Expand All @@ -13,7 +13,7 @@ type TProps = {
onConfirm?: () => void
}

const YesOrNoButton: React.FC<TProps> = ({
const YesOrNoButton: FC<TProps> = ({
align = 'center',
cancelText = '取消',
confirmText = '确定',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cards/CommunityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* cards for job MasonryCards view
*/

import React from 'react'
import React, { FC } from 'react'

import type { TCommunity } from '@/spec'
import { cutRest } from '@/utils'
Expand All @@ -21,7 +21,7 @@ type TProps = {
item: TCommunity
}

const CommunityCard: React.FC<TProps> = ({
const CommunityCard: FC<TProps> = ({
item: { id, logo, title, raw, desc, subscribersCount },
}) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cards/JobCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* cards for job MasonryCards view
*/

import React from 'react'
import React, { FC } from 'react'
import TimeAgo from 'timeago-react'

import { ICON } from '@/config'
Expand Down Expand Up @@ -54,7 +54,7 @@ type TProps = {
}
}

const JobCard: React.FC<TProps> = ({
const JobCard: FC<TProps> = ({
item: { title, body, author, insertedAt, commentsCount, images },
}) => {
const fakeCommunity = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cards/WorksCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import { ICON, ICON_CMD } from '@/config'
import { buildLog, cutRest } from '@/utils'
Expand Down Expand Up @@ -58,7 +58,7 @@ type TProps = {
}
}

const WorksCard: React.FC<TProps> = ({
const WorksCard: FC<TProps> = ({
testid = 'works-card',
item,
withBg = false,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Checker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import type { TSIZE_SM } from '@/spec'
import { ICON } from '@/config'
Expand All @@ -24,7 +24,7 @@ type TProps = {
onChange?: (checked: boolean) => void
}

const Checker: React.FC<TProps> = ({
const Checker: FC<TProps> = ({
checked = false,
onChange = log,
hiddenMode = false,
Expand Down
4 changes: 2 additions & 2 deletions src/components/CommunityFaceLogo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'
import { isEmpty } from 'ramda'

import { HCN } from '@/constant'
Expand All @@ -24,7 +24,7 @@ type TProps = {
className?: string
}

const CommunityFaceLogo: React.FC<TProps> = ({
const CommunityFaceLogo: FC<TProps> = ({
noFill = false,
src = '',
raw = HCN,
Expand Down
4 changes: 2 additions & 2 deletions src/components/CustomScroller/HorizontalScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React, { useState, useRef, useCallback } from 'react'
import React, { FC, useState, useRef, useCallback } from 'react'
import { useTheme } from 'styled-components'
import { Waypoint } from 'react-waypoint'
import type { TThemeMap } from '@/spec'
Expand Down Expand Up @@ -38,7 +38,7 @@ type TProps = Omit<
>

// horizontal version
const HorizontalScroller: React.FC<TProps> = ({
const HorizontalScroller: FC<TProps> = ({
height = '100%',
width = '100%',
innerHeight = '100%',
Expand Down
7 changes: 3 additions & 4 deletions src/components/CustomScroller/VerticalScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
*
*/

import React, { useState, useRef, useCallback } from 'react'
import React, { FC, useState, useRef, useCallback } from 'react'
import { useTheme } from 'styled-components'
import { Waypoint } from 'react-waypoint'
import type { TSIZE_SML, TThemeMap } from '@/spec'
import type { TScrollDirection } from './spec'
import type { TThemeMap } from '@/spec'

import { buildLog, debounce } from '@/utils'
import { SIZE } from '@/constant'
Expand All @@ -30,7 +29,7 @@ const log = buildLog('c:CustomScroller:index')
type TProps = Omit<TScrollProps, 'direction' | 'innerHeight'>

// vertical version
const VerticalScroller: React.FC<TProps> = ({
const VerticalScroller: FC<TProps> = ({
height = '100%',
width = '100%',
showShadow = true,
Expand Down
4 changes: 2 additions & 2 deletions src/components/CustomScroller/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import type { TSIZE_SML } from '@/spec'
import type { TDirection, TScrollDirection } from './spec'
Expand Down Expand Up @@ -28,7 +28,7 @@ export type TProps = {
onScrollDirectionChange?: (dir: TScrollDirection) => void
}

const CustomScroller: React.FC<TProps> = ({
const CustomScroller: FC<TProps> = ({
children,
direction = 'vertical',
...restProps
Expand Down
4 changes: 2 additions & 2 deletions src/components/DigestSentence/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import { ICON } from '@/config'
import { buildLog } from '@/utils'
Expand Down Expand Up @@ -34,7 +34,7 @@ type TProps = {
right?: number
}

const DigestSentence: React.FC<TProps> = ({
const DigestSentence: FC<TProps> = ({
testid = 'digest-sentence',
children = '可能是最性感的开发者社区,来为你心爱的作品建立...',
onPreview = log,
Expand Down
4 changes: 2 additions & 2 deletions src/components/DotDivider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'

import { buildLog } from '@/utils'
import { Wrapper } from './styles'
Expand All @@ -17,7 +17,7 @@ export type TProps = {
radius?: number
space?: number
}
const DotDivider: React.FC<TProps> = ({
const DotDivider: FC<TProps> = ({
radius = 3,
space = 3,
className = 'dot-divider-class',
Expand Down
4 changes: 2 additions & 2 deletions src/components/ErrorPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

import React from 'react'
import React, { FC } from 'react'
import { useRouter } from 'next/router'
import Link from 'next/link'

Expand Down Expand Up @@ -40,7 +40,7 @@ export type TProps = {
metric?: string
}

const ErrorPage: React.FC<TProps> = ({
const ErrorPage: FC<TProps> = ({
testid = 'error-page',
errorCode,
metric = METRIC.COMMUNITY,
Expand Down
4 changes: 2 additions & 2 deletions src/components/FiltersMenu/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { FC } from 'react'

import { ICON } from '@/config'
import Tooltip from '@/components/Tooltip'
Expand All @@ -18,7 +18,7 @@ type TProps = {
onReset: () => void
}

const Header: React.FC<TProps> = ({ title, showReset, onReset }) => {
const Header: FC<TProps> = ({ title, showReset, onReset }) => {
return (
<Wrapper>
<Title active={showReset}>{title}</Title>
Expand Down
Loading