mirror of
https://github.com/tooot-app/app
synced 2025-04-22 22:27:37 +02:00
Fix Android crashing
This commit is contained in:
parent
9f76fa08a8
commit
be30ec3e3c
@ -1,6 +1,7 @@
|
|||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import { maxBy, minBy } from 'lodash'
|
import { maxBy, minBy } from 'lodash'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import { Platform } from 'react-native'
|
||||||
import Svg, { G, Path } from 'react-native-svg'
|
import Svg, { G, Path } from 'react-native-svg'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
@ -68,7 +69,7 @@ const Sparkline: React.FC<Props> = ({ data, width, height, margin = 0 }) => {
|
|||||||
const fillPoints = linePoints.concat(closePolyPoints)
|
const fillPoints = linePoints.concat(closePolyPoints)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Svg height='auto' width={width}>
|
<Svg height={Platform.OS !== 'android' ? 'auto' : 24} width={width}>
|
||||||
<G>
|
<G>
|
||||||
<Path d={'M' + fillPoints.join(' ')} fill={colors.blue} fillOpacity={0.1} />
|
<Path d={'M' + fillPoints.join(' ')} fill={colors.blue} fillOpacity={0.1} />
|
||||||
<Path
|
<Path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user