File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 44 *
55 * SPDX-License-Identifier: MIT
66 */
7- import { Box , useTheme } from "@chakra-ui/react" ;
7+ import { Box , useToken } from "@chakra-ui/react" ;
88import { useSize } from "@chakra-ui/react-use-size" ;
99import { AccelerometerDataEvent } from "@microbit/microbit-connection" ;
1010import { useCallback , useEffect , useRef } from "react" ;
@@ -345,8 +345,7 @@ const LiveGraph = () => {
345345 const [ { graphColorScheme, graphLineScheme, graphLineWeight } ] =
346346 useSettings ( ) ;
347347
348- const theme = useTheme ( ) ;
349- const fontFamily : string = theme . fonts ?. body ?? "sans-serif" ;
348+ const [ fontFamily ] = useToken ( "fonts" , [ "body" ] ) ;
350349 const colors = useGraphColors ( graphColorScheme ) ;
351350 const lineStyles = useGraphLineStyles ( graphLineScheme ) ;
352351 const canvasRef = useRef < HTMLCanvasElement > ( null ) ;
You can’t perform that action at this time.
0 commit comments