From b761f48ed8cf42ae4ff04a06c92917461af0da15 Mon Sep 17 00:00:00 2001 From: Hailey Date: Mon, 17 Jun 2024 16:34:34 -0700 Subject: [PATCH] use existing gradient --- src/components/LinearGradientBackground.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/LinearGradientBackground.tsx b/src/components/LinearGradientBackground.tsx index d2a18d1a80..f516b19f5f 100644 --- a/src/components/LinearGradientBackground.tsx +++ b/src/components/LinearGradientBackground.tsx @@ -2,7 +2,7 @@ import React from 'react' import {StyleProp, ViewStyle} from 'react-native' import {LinearGradient} from 'expo-linear-gradient' -import {useTheme} from '#/alf' +import {gradients} from '#/alf/tokens' export function LinearGradientBackground({ style, @@ -11,12 +11,9 @@ export function LinearGradientBackground({ style: StyleProp children: React.ReactNode }) { - const t = useTheme() - - const gradient = - t.name === 'light' - ? [t.palette.primary_500, t.palette.primary_300] - : [t.palette.primary_600, t.palette.primary_400] + const gradient = gradients.sky.values.map(([_, color]) => { + return color + }) return (