Skip to content

Commit aa533fd

Browse files
committed
feat: Add NewCoordinateNotes and Tags screens; update navigation and icon exports
1 parent 6496964 commit aa533fd

File tree

5 files changed

+148
-105
lines changed

5 files changed

+148
-105
lines changed

App.tsx

Lines changed: 73 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { NavigationContainer, useNavigation } from '@react-navigation/native'
88
import { CardStyleInterpolators, createStackNavigator, type StackNavigationOptions } from '@react-navigation/stack'
99
import ComputerScienceSettings from '@screens/ComputerScience/ComputerScienceSettings'
1010
import CoordinateNotes from '@screens/CoordinateNotes/CoordinateNotes'
11+
import NewCoordinateNotes from '@screens/CoordinateNotes/NewCoordinateNotes'
12+
import Tags from '@screens/CoordinateNotes/Tags'
1113
import DeveloperOptions from '@screens/DeveloperOptions/DeveloperOptions'
1214
import MMKVDataEditor, { type MMKVDataEditorParamList } from '@screens/DeveloperOptions/MMKVDataEditor'
1315
import MMKVDataList from '@screens/DeveloperOptions/MMKVDataList'
@@ -59,7 +61,6 @@ import { Dimensions, SafeAreaView, useColorScheme } from 'react-native'
5961
import { GestureHandlerRootView } from 'react-native-gesture-handler'
6062
import Animated, { ZoomIn, ZoomOut } from 'react-native-reanimated'
6163
import './global.css'
62-
import NewCoordinateNotes from '@screens/CoordinateNotes/NewCoordinateNotes'
6364

6465
function App(): React.JSX.Element {
6566
const scheme = useColorScheme()
@@ -98,74 +99,6 @@ const SMOOTH_ANIMATION: StackNavigationOptions = {
9899
gestureResponseDistance: height,
99100
}
100101

101-
export type RootStackParamList = {
102-
Home: undefined
103-
Location: undefined
104-
Test: undefined
105-
CompassAnimation: undefined
106-
ParallaxWallpaper: undefined
107-
LevelAnimation: undefined
108-
StableWallpaper: undefined
109-
StableBox: undefined
110-
HandlingGesture: undefined
111-
SensorAnimation: undefined
112-
ApplyingModifiers: undefined
113-
CustomizingAnimations: undefined
114-
Basic: undefined
115-
KeyboardAnimation: undefined
116-
// Animations: undefined
117-
DragAnimation: undefined
118-
Weather: undefined
119-
WeatherWelcome: undefined
120-
WeatherSearchCity: SearchCityParamList
121-
WeatherLocation: WeatherLocationParamList
122-
Greeting: undefined
123-
Settings: undefined
124-
Explore: undefined
125-
RoutineWelcome: undefined
126-
NotesWelcome: undefined
127-
ConfirmCity: ConfirmCityParamList
128-
ComputerScienceSettings: undefined
129-
WeatherSettings: undefined
130-
DeveloperOptions: undefined
131-
MMKVDataEditor: MMKVDataEditorParamList
132-
MMKVDataList: undefined
133-
UiAndComponents: undefined
134-
BlankSettings: undefined
135-
TempUnit: undefined
136-
DistanceUnit: undefined
137-
WindSpeedUnit: undefined
138-
AtmPressureUnit: undefined
139-
TimeFormatUnit: undefined
140-
ManageStorage: undefined
141-
BackupAndRestore: undefined
142-
About: undefined
143-
YourProfile: undefined
144-
YourAge: undefined
145-
RandomColor: undefined
146-
AppLock: undefined
147-
RandomPassword: undefined
148-
GlobalSearch: undefined
149-
Update: UpdateParamList
150-
Splash: undefined
151-
Login: undefined
152-
Signup: undefined
153-
Verify: VerifyParamList
154-
Devices: undefined
155-
Device: DeviceParamList
156-
AllUsers: undefined
157-
EditVersion: undefined
158-
Story: undefined
159-
User: UserParamList
160-
FCFS: undefined
161-
SJF: undefined
162-
Chart: ChartParamList
163-
Onboarding: undefined
164-
Skia: undefined
165-
CoordinateNotes: undefined
166-
NewCoordinateNotes: undefined
167-
}
168-
169102
const Stack = createStackNavigator<RootStackParamList>()
170103

171104
const GestureEnabled = { gestureEnabled: true }
@@ -263,12 +196,82 @@ function Navigation() {
263196
<Stack.Screen name='Chart' component={Chart} options={IOS_BOTTOM_STYLE} />
264197
<Stack.Screen name='Onboarding' component={Onboarding} options={NO_ANIMATION} />
265198
<Stack.Screen name='CoordinateNotes' component={CoordinateNotes} options={GestureEnabled} />
266-
<Stack.Screen name='NewCoordinateNotes' component={NewCoordinateNotes} options={IOS_BOTTOM_STYLE} />
199+
<Stack.Screen name='NewCoordinateNotes' component={NewCoordinateNotes} options={GestureEnabled} />
200+
<Stack.Screen name='Tags' component={Tags} options={IOS_BOTTOM_STYLE} />
267201
</Stack.Navigator>
268202
</>
269203
)
270204
}
271205

206+
export type RootStackParamList = {
207+
Tags: undefined
208+
Home: undefined
209+
Location: undefined
210+
Test: undefined
211+
CompassAnimation: undefined
212+
ParallaxWallpaper: undefined
213+
LevelAnimation: undefined
214+
StableWallpaper: undefined
215+
StableBox: undefined
216+
HandlingGesture: undefined
217+
SensorAnimation: undefined
218+
ApplyingModifiers: undefined
219+
CustomizingAnimations: undefined
220+
Basic: undefined
221+
KeyboardAnimation: undefined
222+
// Animations: undefined
223+
DragAnimation: undefined
224+
Weather: undefined
225+
WeatherWelcome: undefined
226+
WeatherSearchCity: SearchCityParamList
227+
WeatherLocation: WeatherLocationParamList
228+
Greeting: undefined
229+
Settings: undefined
230+
Explore: undefined
231+
RoutineWelcome: undefined
232+
NotesWelcome: undefined
233+
ConfirmCity: ConfirmCityParamList
234+
ComputerScienceSettings: undefined
235+
WeatherSettings: undefined
236+
DeveloperOptions: undefined
237+
MMKVDataEditor: MMKVDataEditorParamList
238+
MMKVDataList: undefined
239+
UiAndComponents: undefined
240+
BlankSettings: undefined
241+
TempUnit: undefined
242+
DistanceUnit: undefined
243+
WindSpeedUnit: undefined
244+
AtmPressureUnit: undefined
245+
TimeFormatUnit: undefined
246+
ManageStorage: undefined
247+
BackupAndRestore: undefined
248+
About: undefined
249+
YourProfile: undefined
250+
YourAge: undefined
251+
RandomColor: undefined
252+
AppLock: undefined
253+
RandomPassword: undefined
254+
GlobalSearch: undefined
255+
Update: UpdateParamList
256+
Splash: undefined
257+
Login: undefined
258+
Signup: undefined
259+
Verify: VerifyParamList
260+
Devices: undefined
261+
Device: DeviceParamList
262+
AllUsers: undefined
263+
EditVersion: undefined
264+
Story: undefined
265+
User: UserParamList
266+
FCFS: undefined
267+
SJF: undefined
268+
Chart: ChartParamList
269+
Onboarding: undefined
270+
Skia: undefined
271+
CoordinateNotes: undefined
272+
NewCoordinateNotes: undefined
273+
}
274+
272275
const FabButton = () => {
273276
const navigation = useNavigation<StackNav>()
274277
return (

src/assets/icons/icons.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,5 @@ export { default as DashboardSpeed02Icon } from '@icons/dashboard-speed-02-solid
145145
export { default as Rocket01Icon } from '@icons/rocket-01-solid-rounded.svg'
146146
export { default as EarthIcon } from '@icons/earth-solid-rounded.svg'
147147
export { default as Timer02Icon } from '@icons/timer-02-solid-rounded.svg'
148+
export { default as ArrowDown01StrokeRoundedIcon } from '@icons/arrow-down-01-stroke-rounded.svg'
149+
export { default as ArrowRight01StrokeRoundedIcon } from '@icons/arrow-right-01-stroke-rounded.svg'
Lines changed: 3 additions & 0 deletions
Loading

src/screens/CoordinateNotes/NewCoordinateNotes.tsx

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
DashboardSpeed02Icon,
33
EarthIcon,
4+
Home01SolidIcon,
45
LatitudeIcon,
56
LongitudeIcon,
67
MapsLocation02SolidIcon,
@@ -14,57 +15,72 @@ import RoundedIcon from '@components/RoundedIcon'
1415
import { PaddingBottom } from '@components/SafePadding'
1516
import SettGroup from '@components/Settings/SettGroup'
1617
import { SettOption } from '@components/Settings/SettOption'
18+
import SettWrapper from '@components/Settings/SettWrapper'
1719
import { Txt } from '@components/Text'
18-
import { AppBar } from '@components/TopBar'
1920
import { fetchLocation } from '@screens/CoordinateNotes/lib'
2021
import { useQuery } from '@tanstack/react-query'
21-
import { Bold } from '@utils/fonts'
2222
import { NavProp } from '@utils/types'
2323
import { getLatitude, getLongitude } from '@utils/utils'
24-
import { useEffect } from 'react'
25-
import { StatusBar, View } from 'react-native'
24+
import { View } from 'react-native'
2625
import { GeoPosition } from 'react-native-geolocation-service'
27-
import { ScrollView } from 'react-native-gesture-handler'
2826

29-
export default function NewCoordinateNotes({navigation} : NavProp) {
27+
export default function NewCoordinateNotes({ navigation }: NavProp) {
3028
const { data, isFetching, refetch } = useQuery({
3129
queryFn: fetchLocation,
3230
queryKey: ['currentLocation'],
3331
})
3432

3533
return (
36-
<View className='flex-1 bg-zinc-50 dark:bg-zinc-950'>
37-
<StatusBar barStyle='default' />
38-
<AppBar />
39-
<Bold className='px-5 pb-4 text-2xl dark:text-white'>Current Location</Bold>
40-
<ScrollView contentContainerClassName='justify-between flex-1'>
41-
<Gap12>
42-
<SettGroup title='Location Name'>
43-
<Input
44-
Icon={<RoundedIcon Icon={MapsLocation02SolidIcon} className='bg-blue-500' />}
45-
placeholder='Enter a name for this location'
46-
/>
47-
</SettGroup>
48-
<SettGroup title='Description'>
49-
<Input
50-
placeholder='This is a input field with multiple lines. You can type as much as you want.'
51-
multiline
52-
numberOfLines={10}
53-
/>
54-
</SettGroup>
55-
<LocationDetails data={data} />
56-
<BtnTransparent
57-
title={isFetching ? 'Fetching...' : 'Refetch Location'}
58-
onPress={() => refetch()}
59-
disabled={isFetching}
34+
<SettWrapper
35+
className='flex-1'
36+
// Header={
37+
// <BackHeader
38+
// title={'New Location Note'}
39+
// navigation={navigation}
40+
// Right={
41+
// <Press>
42+
// <SemiBold className='text-sm text-accent'>Save</SemiBold>
43+
// </Press>
44+
// }
45+
// />
46+
// }
47+
title={'New Location Note'}
48+
>
49+
<Gap12 className='mt-3'>
50+
<SettGroup title='Location Name'>
51+
<Input
52+
Icon={<RoundedIcon Icon={MapsLocation02SolidIcon} className='bg-blue-500' />}
53+
placeholder='Enter a name for this location'
6054
/>
61-
</Gap12>
62-
<View className='px-5 py-3'>
63-
<Btn title={'Add Location Note'} onPress={() => navigation.goBack()} />
55+
</SettGroup>
56+
<SettGroup title='Description'>
57+
<Input
58+
placeholder='This is a input field with multiple lines. You can type as much as you want.'
59+
multiline
60+
numberOfLines={10}
61+
/>
62+
</SettGroup>
63+
<SettGroup title='Tag'>
64+
<SettOption
65+
title=''
66+
placeholder='Add a tag'
67+
Icon={<RoundedIcon Icon={Home01SolidIcon} className='bg-blue-500' />}
68+
onPress={() => navigation.navigate('Tags')}
69+
arrow
70+
/>
71+
</SettGroup>
72+
<LocationDetails data={data} />
73+
<BtnTransparent
74+
title={isFetching ? 'Fetching...' : 'Refetch Location'}
75+
onPress={() => refetch()}
76+
disabled={isFetching}
77+
/>
78+
<View className='px-5'>
79+
<Btn title={'Save Location Note'} onPress={() => navigation.goBack()} />
6480
<PaddingBottom />
6581
</View>
66-
</ScrollView>
67-
</View>
82+
</Gap12>
83+
</SettWrapper>
6884
)
6985
}
7086

src/screens/CoordinateNotes/Tags.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { PaddingBottom } from '@components/SafePadding'
2+
import { AppBar } from '@components/TopBar'
3+
import { Bold, Medium } from '@utils/fonts'
4+
import { StatusBar, View } from 'react-native'
5+
import { ScrollView } from 'react-native-gesture-handler'
6+
7+
export default function Tags() {
8+
return (
9+
<View className='flex-1 bg-zinc-50 dark:bg-zinc-950'>
10+
<StatusBar barStyle='default' />
11+
<AppBar />
12+
<ScrollView contentContainerClassName='p-5 flex-1 justify-center items-center'>
13+
<Bold className='text-3xl text text-center'>Coming Soon!</Bold>
14+
<Medium className='text opacity-80 text-base mt-3 text-center'>This feature is currently under development. Stay tuned for updates!</Medium>
15+
<PaddingBottom />
16+
</ScrollView>
17+
</View>
18+
)
19+
}

0 commit comments

Comments
 (0)