Skip to content

Commit cc8ebb2

Browse files
committed
fix: update imports to use Colors utility and adjust formatting in various components
1 parent 2dbd78f commit cc8ebb2

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646
"ListFooterComponentClassName",
4747
"ListHeaderComponentClassName"
4848
],
49-
"tailwindCSS.classFunctions": ["useResolveClassNames"]
49+
"tailwindCSS.classFunctions": ["useResolveClassNames"],
50+
"editor.defaultFormatter": "biomejs.biome",
51+
"[typescriptreact]": {
52+
"editor.defaultFormatter": "biomejs.biome"
53+
}
5054
// "editor.codeActionsOnSave": {
5155
// "source.organizeImports": "always"
5256
// }

src/screens/Messages/Messages.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const WS_URL = 'wss://harkirat.codeabinash.workers.dev/ws'
1313

1414
export default function Messages({ navigation }: NavProp) {
1515
const [messages, setMessages] = useState<Message[]>(demoMessages)
16-
const [input, setInput] = useState('')
16+
const [input, setInput] = useState('')
1717
const [connected, setConnected] = useState(false)
1818
const ws = useRef<WebSocket | null>(null)
1919
const flatListRef = useRef<FlatList>(null)

src/screens/Settings/UiAndComponents.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { Colors } from '@utils/colors'
2626
import type { NavProp } from '@utils/types'
2727
import React, { useEffect, useState } from 'react'
2828
import { Text, View } from 'react-native'
29-
import colors from 'tailwindcss/colors'
3029

3130
export default function UiAndComponents({ navigation }: NavProp) {
3231
const [toggle1, setToggle1] = useState(true)
@@ -139,19 +138,19 @@ export default function UiAndComponents({ navigation }: NavProp) {
139138
<SettGroup title='Your favorite Programming Language'>
140139
<SettOption
141140
title='TypeScript'
142-
Icon={<Typescript01Icon color={colors.blue[500]} size={35} />}
141+
Icon={<Typescript01Icon color={Colors.blue[500]} size={35} />}
143142
onPress={() => setOption1('TypeScript')}
144143
Right={<Check checked={option1 === 'TypeScript'} />}
145144
/>
146145
<SettOption
147146
title='JavaScript'
148-
Icon={<JavaScriptIcon color={colors.yellow[500]} size={35} />}
147+
Icon={<JavaScriptIcon color={Colors.yellow[500]} size={35} />}
149148
onPress={() => setOption1('JavaScript')}
150149
Right={<Check className='text-amber-500' checked={option1 === 'JavaScript'} />}
151150
/>
152151
<SettOption
153152
title='C++'
154-
Icon={<CpuIcon color={colors.blue[500]} size={35} />}
153+
Icon={<CpuIcon color={Colors.blue[500]} size={35} />}
155154
onPress={() => setOption1('C++')}
156155
Right={<Check className='text-blue-500' checked={option1 === 'C++'} />}
157156
/>

src/screens/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { PaddingBottom } from '@components/SafePadding'
2-
import { HugeIconProps } from '@hugeicons/constants'
32
import Home01Icon from '@hugeicons/Home01Icon'
43
import Saturn01Icon from '@hugeicons/Saturn01Icon'
54
import TestTube01Icon from '@hugeicons/TestTube01Icon'
65
import Wallet02Icon from '@hugeicons/Wallet02Icon'
7-
import { createBottomTabNavigator, type BottomTabBarProps } from '@react-navigation/bottom-tabs'
6+
import { HugeIconProps } from '@hugeicons/constants'
7+
import { type BottomTabBarProps, createBottomTabNavigator } from '@react-navigation/bottom-tabs'
88
import { Colors } from '@utils/colors'
99
import { SemiBold } from '@utils/fonts'
1010
import React, { type ReactNode } from 'react'
11-
import { TouchableOpacity, View, useColorScheme, type ColorSchemeName } from 'react-native'
12-
import colors from 'tailwindcss/colors'
11+
import { type ColorSchemeName, TouchableOpacity, View, useColorScheme } from 'react-native'
1312
import HomeScreen from './Home/HomeScreen'
1413
import TyrItOut from './Try/TyrItOut'
1514
import ComingSoon from './UnderConstruction'
@@ -91,7 +90,7 @@ export function getFocusedColor(theme: ColorSchemeName) {
9190
}
9291

9392
export function getColor(theme: ColorSchemeName) {
94-
return theme === 'dark' ? colors.zinc[400] : colors.zinc[600]
93+
return theme === 'dark' ? Colors.zinc[400] : Colors.zinc[600]
9594
}
9695

9796
const screens = [

0 commit comments

Comments
 (0)