Skip to content

Commit d69f880

Browse files
committed
fix: Use theme fonts
1 parent a76ca04 commit d69f880

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/leaderboard/Leaderboard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import Text from '@chakra-ui/core/dist/Text'
33
import Flex from '@chakra-ui/core/dist/Flex'
44
import Box from '@chakra-ui/core/dist/Box'
5-
import { defaultTheme as theme } from '@47ng/chakra-next'
5+
import { useTheme } from '@chakra-ui/core/dist/ThemeProvider'
66
import { LeaderboardEntry } from '@chiffre/analytics-processing'
77
import { PieDatum } from '@nivo/pie'
88
import { LeaderboardEntryView } from './EntryView'
@@ -32,6 +32,7 @@ export const Leaderboard: React.FC<LeadeboardProps> = ({
3232
showPercentByDefault = false,
3333
pieData
3434
}) => {
35+
const theme = useTheme()
3536
const [showPercent, setShowPercent] = React.useState(showPercentByDefault)
3637

3738
const data = React.useMemo(() => {

src/leaderboard/PieChart.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { defaultTheme as theme } from '@47ng/chakra-next'
2+
import { useTheme } from '@chakra-ui/core/dist/ThemeProvider'
3+
import { Theme } from '@47ng/chakra-next'
34
import { ResponsivePie, PieDatum } from '@nivo/pie'
45

56
export interface PieChartProps {
@@ -8,6 +9,7 @@ export interface PieChartProps {
89
}
910

1011
export const PieChart: React.FC<PieChartProps> = ({ data, showPercent }) => {
12+
const theme = useTheme() as Theme
1113
return (
1214
<ResponsivePie
1315
colors={[

0 commit comments

Comments
 (0)