Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/pages/graduate/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
font-family: Arial, Helvetica, sans-serif;
cursor: pointer;
}

}
.graduate {
width: 80%;
Expand All @@ -20,6 +19,7 @@

.graduateMessage {
width: 100%;
min-height: 700px;
display: grid;
grid-template-columns: repeat(auto-fill, 100%);
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/graduate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { getGraduateMemberInfo } from '@/api/member'
import Year from '../year/index'
import Year from '../year'
import './index.less'

// 成员
Expand Down
2 changes: 1 addition & 1 deletion src/pages/group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type GroupProps = {
const Group: React.FC<GroupProps> = (props) => {
const { teamName } = props
const [list, setList] = React.useState<MemberInfo[]>([])
const [parent] = useAutoAnimate(/* optional config */) as any
const [parent] = useAutoAnimate() as any
React.useEffect(() => {
getMemberInfo({ size: 100, team: teamName }).then((res) => {
if (res) {
Expand Down
1 change: 1 addition & 0 deletions src/pages/member-style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
}
}
.group-member {
min-height: 700px;
display: flex;
flex-wrap: wrap;
justify-content: center;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/member-style/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react'
import { TeamNameEnum } from '@/common/inteface'
import Group from '../group/index'
import Group from '../group'
import { useAutoAnimate } from '@formkit/auto-animate/react'
import './index.less'

const Member: React.FC = () => {
const [state, setState] = React.useState(0)
const [group, setGroup] = React.useState<TeamNameEnum>(TeamNameEnum.Android)
const [parent] = useAutoAnimate(/* optional config */) as any
const [parent] = useAutoAnimate() as any
const groupList: { id: TeamNameEnum; index: number }[] = [
{ id: TeamNameEnum.Android, index: 0 },
{ id: TeamNameEnum.iOS, index: 1 },
Expand Down
10 changes: 8 additions & 2 deletions src/pages/member/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ import './index.less'

const Member: React.FC = () => {
const { path, url } = useRouteMatch()
const [state, setState] = React.useState(0)

const [state, setState] = React.useState(() => {
const pathname = window.location.pathname
if (pathname === '/member/graduate' || pathname === '/member') {
return 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

别0 1 了,用enum吧

} else {
return 1
}
})
return (
<div className="wrapper-max">
<div className="member-header">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/year/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import randomArr from '@/common/utils/random-array'
const Year: React.FC<{ clicked: number }> = (props) => {
const { clicked } = props
const [list, setList] = React.useState<GraduateMemberInfo[]>([])
const [parent] = useAutoAnimate(/* optional config */) as any
const [parent] = useAutoAnimate() as any
React.useEffect(() => {
getGraduateMemberInfo({ size: 100, year: `${clicked}` }).then((res) => {
if (res) {
Expand Down