Skip to content

Commit a87f4e9

Browse files
chore: migrate leaderboard page to tailwindcss
1 parent 85b8783 commit a87f4e9

File tree

3 files changed

+7
-41
lines changed

3 files changed

+7
-41
lines changed

src/pages/_app.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import {
1111
WindowSizeContextProvider,
1212
AnalysisListContextProvider,
1313
} from 'src/providers'
14-
import { Compose, ErrorBoundary, Header } from 'src/components/'
1514
import 'src/styles/globals.scss'
1615
import 'src/styles/tailwind.css'
1716
import 'react-tooltip/dist/react-tooltip.css'
1817
import 'chessground/assets/chessground.base.css'
1918
import 'chessground/assets/chessground.brown.css'
2019
import 'chessground/assets/chessground.cburnett.css'
2120
import { Footer } from 'src/components/Footer/Footer'
21+
import { Compose, ErrorBoundary, Header } from 'src/components/'
2222

2323
function MaiaPlatform({ Component, pageProps }: AppProps) {
2424
const router = useRouter()

src/pages/leaderboard.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import styles from 'src/styles/App.module.scss'
2-
import { LeaderboardColumn } from 'src/components/LeaderboardColumn/LeaderboardColumn'
1+
import { useCallback, useEffect, useState } from 'react'
2+
33
import {
44
BrainIcon,
55
HandIcon,
66
RegularPlayIcon,
77
TrainIcon,
88
TuringIcon,
99
} from 'src/components/Icons/icons'
10-
import { useCallback, useEffect, useState } from 'react'
1110
import { getLeaderboard } from 'src/api'
11+
import { LeaderboardColumn } from 'src/components/LeaderboardColumn/LeaderboardColumn'
1212

1313
const Leaderboard: React.FC = () => {
1414
const [lastUpdated, setLastUpdated] = useState<Date | null>(null)
@@ -57,8 +57,8 @@ const Leaderboard: React.FC = () => {
5757
}, [fetchLeaderboard])
5858

5959
return (
60-
<div className={styles.leaderboardPage}>
61-
<div className={styles.leaderboardHeader}>
60+
<div className="flex h-full w-full flex-col items-start justify-center gap-8 px-[4%] py-[2%]">
61+
<div className="flex flex-col">
6262
<h1 className="text-4xl font-bold">Rating Leaderboards</h1>
6363
<p>
6464
Last Updated:{' '}
@@ -74,7 +74,7 @@ const Leaderboard: React.FC = () => {
7474
: '...'}
7575
</p>
7676
</div>
77-
<div className={styles.leaderboardContainer}>
77+
<div className="flex h-full w-full flex-row flex-wrap justify-start gap-4">
7878
{leaderboard?.map((column, index) => (
7979
<LeaderboardColumn key={index} {...column} />
8080
))}

src/styles/App.module.scss

-34
Original file line numberDiff line numberDiff line change
@@ -536,37 +536,3 @@
536536
}
537537
}
538538
}
539-
540-
.leaderboardPage {
541-
display: flex;
542-
flex-direction: column;
543-
align-items: start;
544-
justify-content: center;
545-
gap: 20px;
546-
width: 100%;
547-
padding: 2% 4%;
548-
height: 100%;
549-
550-
@include mobile {
551-
padding: 15% 4%;
552-
}
553-
554-
.leaderboardHeader {
555-
display: flex;
556-
flex-direction: column;
557-
558-
p {
559-
margin: 0px;
560-
}
561-
}
562-
563-
.leaderboardContainer {
564-
display: flex;
565-
flex-direction: row;
566-
flex-wrap: wrap;
567-
justify-content: start;
568-
gap: 25px;
569-
width: 100%;
570-
height: 100%;
571-
}
572-
}

0 commit comments

Comments
 (0)