Skip to content

Commit

Permalink
feat: improve uxui and update new logo
Browse files Browse the repository at this point in the history
  • Loading branch information
boy52hz committed Apr 26, 2024
1 parent 54f8bf2 commit 0d938b4
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 46 deletions.
Binary file modified assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/logo/logo.png
Binary file not shown.
Binary file modified assets/map_marker_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/app/(protected)/signup/new-service-spot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import MapView, { Marker, PROVIDER_GOOGLE, Region } from 'react-native-maps'
import { Alert, StyleSheet, ToastAndroid } from 'react-native'
import { Coordinate } from '@/apis/service-spots/type'
import { DRIVER_INFO_QUERY_KEY, useDriverInfo } from '@/hooks/useDriverInfo'
import CustomMarkerImage from '@/components/map/CustomMarkerImage'
import { isAxiosError } from 'axios'

type Params = {
Expand Down Expand Up @@ -182,9 +181,10 @@ const AddAddress = () => {
rotateEnabled={false}
scrollEnabled={false}
>
<Marker coordinate={parsedRegion}>
<CustomMarkerImage color="orange" />
</Marker>
<Marker
coordinate={parsedRegion}
icon={require('../../../../../assets/map_marker_orange.png')}
/>
</MapView>
) : (
<TouchableOpacity style={styles.mapCard} onPress={openMapPicker}>
Expand Down
11 changes: 4 additions & 7 deletions src/components/JobOfferModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { mapUtil } from '@/utils/map'
import Waypoint from './Waypoint'
import { DriveRequestSession, DriveRequestSessionStatus } from '@/sockets/drive-request/type'
import { commonUtil } from '@/utils/common'
import CustomMarkerImage from './map/CustomMarkerImage'

type Props = {
driveRequest: DriveRequestSession | null
Expand Down Expand Up @@ -55,10 +54,9 @@ export default function JobOfferModal({ driveRequest, onAccepted, onRejected }:
latitude: driveRequest.origin?.location.lat!,
longitude: driveRequest.origin?.location.lng!,
}}
icon={require('../../assets/map_marker_blue.png')}
tracksViewChanges={false}
>
<CustomMarkerImage color="blue" />
</Marker>
/>
{points.length > 0 && (
<Polyline coordinates={points} strokeWidth={3} strokeColor="#7C89FF" />
)}
Expand All @@ -68,10 +66,9 @@ export default function JobOfferModal({ driveRequest, onAccepted, onRejected }:
latitude: driveRequest.destination?.location.lat!,
longitude: driveRequest.destination?.location.lng!,
}}
icon={require('../../assets/map_marker_red.png')}
tracksViewChanges={false}
>
<CustomMarkerImage color="red" />
</Marker>
/>
</MapView>
<View absB absL bg-white padding-25 gap-20 style={styles.footer}>
<View>
Expand Down
24 changes: 0 additions & 24 deletions src/components/map/CustomMarkerImage.tsx

This file was deleted.

20 changes: 9 additions & 11 deletions src/contexts/JobContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ export default function JobContextProvider({ children }: Props) {
driveRequestSocket.connect()
}, [driveRequestSocket])

const value = useMemo(() => {
return {
driveRequest,
isOnline,
connectToSocket,
updateDriverOnlineStatus,
updateDriveRequestStatus,
}
}, [driveRequest, isOnline, connectToSocket, updateDriverOnlineStatus, updateDriveRequestStatus])

useEffect(() => {
driveRequestSocket.on('job-offer', handleJobOffer)
driveRequestSocket.on('drive-request-created', handleDriveRequestCreated)
Expand Down Expand Up @@ -141,7 +131,15 @@ export default function JobContextProvider({ children }: Props) {
}, [])

return (
<JobContext.Provider value={value}>
<JobContext.Provider
value={{
driveRequest,
isOnline,
connectToSocket,
updateDriverOnlineStatus,
updateDriveRequestStatus,
}}
>
{children}
<JobOfferModal
driveRequest={driveRequest}
Expand Down

0 comments on commit 0d938b4

Please sign in to comment.