Skip to content

Commit

Permalink
refactor(map): break down into several components
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Nov 22, 2024
1 parent b3b235f commit 6fa15e3
Show file tree
Hide file tree
Showing 13 changed files with 1,235 additions and 1,126 deletions.
Binary file modified bun.lockb
Binary file not shown.
582 changes: 291 additions & 291 deletions ios/Podfile.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"@maplibre/maplibre-react-native": "^10.0.0-alpha.26",
"@react-native-community/datetimepicker": "8.2.0",
"@react-native-community/netinfo": "11.4.1",
"@react-navigation/native": "^7.0.3",
"@react-navigation/stack": "^7.0.5",
"@react-navigation/native": "^7.0.0",
"@react-navigation/stack": "^7.0.6",
"@shopify/flash-list": "1.7.1",
"@tanstack/query-sync-storage-persister": "^5.60.6",
"@tanstack/react-query": "^5.61.0",
"@tanstack/react-query-persist-client": "^5.61.0",
"@th3rdwave/react-navigation-bottom-sheet": "0.3.2",
"burnt": "^0.12.2",
"color": "^4.2.3",
"expo": "~52.0.9",
"expo": "~52.0.11",
"expo-application": "~6.0.1",
"expo-blur": "~14.0.1",
"expo-brightness": "~13.0.2",
Expand All @@ -49,11 +49,11 @@
"expo-linear-gradient": "~14.0.1",
"expo-local-authentication": "~15.0.1",
"expo-localization": "~16.0.0",
"expo-navigation-bar": "~4.0.3",
"expo-router": "~4.0.7",
"expo-navigation-bar": "~4.0.4",
"expo-router": "~4.0.9",
"expo-screen-orientation": "~8.0.0",
"expo-secure-store": "~14.0.0",
"expo-splash-screen": "~0.29.12",
"expo-splash-screen": "~0.29.13",
"fuse.js": "^7.0.0",
"graphql": "^16.9.0",
"graphql-request": "^6.1.0",
Expand All @@ -64,7 +64,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-i18next": "^15.1.1",
"react-native": "0.76.2",
"react-native": "0.76.3",
"react-native-collapsible": "1.6.1",
"react-native-context-menu-view": "^1.16.0",
"react-native-device-info": "^14.0.0",
Expand All @@ -73,15 +73,15 @@
"react-native-dynamic-app-icon": "^1.1.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-mmkv": "^2.12.2",
"react-native-pager-view": "~6.4.1",
"react-native-pager-view": "6.5.1",
"react-native-paper": "5.12.5",
"react-native-reanimated": "~3.16.2",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "^4.2.0",
"react-native-screens": "~4.1.0",
"react-native-select-dropdown": "^4.0.1",
"react-native-shimmer": "0.6.0",
"react-native-svg": "15.8.0",
"react-native-unistyles": "^2.12.0",
"react-native-unistyles": "^2.20.0",
"react-native-view-shot": "~4.0.2",
"react-native-webview": "13.12.2",
"react-native-week-view": "0.30.0",
Expand Down Expand Up @@ -116,14 +116,14 @@
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-i18next": "^6.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-n": "^17.13.2",
"eslint-plugin-n": "^17.14.0",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-react": "7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-native": "^4.1.0",
"eslint-plugin-react-native-unistyles": "^0.2.9",
"expo-atlas": "^0.3.27",
"expo-dev-client": "~5.0.3",
"expo-dev-client": "~5.0.4",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/(index)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function HomeRootScreen(): JSX.Element {
}}
>
<WorkaroundStack
name={'Dashboard'}
name={'dashboard'}
titleKey={'navigation.dashboard'}
component={isPageOpen ? HomeScreen : () => <></>}
largeTitle={true}
Expand Down
58 changes: 58 additions & 0 deletions src/components/Map/AttributionLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { Linking, Pressable, Text, View } from 'react-native'
import { createStyleSheet, useStyles } from 'react-native-unistyles'

import PlatformIcon from '../Universal/Icon'

const AttributionLink: React.FC = () => {
const { styles } = useStyles(stylesheet)
const { t } = useTranslation('common')

return (
<View style={styles.attributionContainer}>
<Pressable
onPress={() => {
void Linking.openURL(
'https://www.openstreetmap.org/copyright'
)
}}
style={styles.attributionLink}
>
<Text style={styles.attributionText}>
{t('pages.map.details.osm')}
</Text>
<PlatformIcon
ios={{
name: 'chevron.forward',
size: 11,
}}
android={{
name: 'chevron_right',
size: 16,
}}
style={styles.label}
/>
</Pressable>
</View>
)
}

export default AttributionLink

const stylesheet = createStyleSheet((theme) => ({
attributionContainer: { paddingVertical: 40 },
attributionLink: {
alignItems: 'center',
flexDirection: 'row',
gap: 4,
},
attributionText: {
color: theme.colors.labelColor,
fontSize: 15,
paddingStart: 4,
},
label: {
color: theme.colors.labelColor,
},
}))
Loading

0 comments on commit 6fa15e3

Please sign in to comment.