From b68f903a1cf551e8e58e73ce01d740915c2d4074 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Tue, 8 Nov 2022 12:37:24 +1300 Subject: [PATCH] Remove custom color calculation from Switch --- Switch.tsx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Switch.tsx b/Switch.tsx index 2c86b50..74e34e3 100644 --- a/Switch.tsx +++ b/Switch.tsx @@ -1,10 +1,6 @@ -import {useMemo} from 'react' import {Pressable} from 'react-native' import {Switch as PaperSwitch, Text, useTheme} from 'react-native-paper' -import {CombinedDarkTheme, CombinedDefaultTheme} from './App' -import {colorShade} from './colors' import {MARGIN} from './constants' -import useDark from './use-dark' export default function Switch({ value, @@ -18,19 +14,6 @@ export default function Switch({ children: string }) { const {colors} = useTheme() - const dark = useDark() - - const track = useMemo(() => { - if (dark) - return { - false: CombinedDarkTheme.colors.placeholder, - true: colorShade(colors.primary, -40), - } - return { - false: CombinedDefaultTheme.colors.placeholder, - true: colorShade(colors.primary, -40), - } - }, [dark, colors.primary]) return (