Skip to content

Commit 1edb40b

Browse files
committed
fix(navigation): update room navigation logic to ensure proper routing
1 parent 417f623 commit 1edb40b

File tree

9 files changed

+27
-21
lines changed

9 files changed

+27
-21
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"react-native-screens": "^4.10.0",
8080
"react-native-select-dropdown": "^4.0.1",
8181
"react-native-svg": "15.12.0",
82-
"react-native-unistyles": "^2.41.0",
82+
"react-native-unistyles": "2.32.0",
8383
"react-native-view-shot": "~4.0.3",
8484
"react-native-web": "^0.20.0",
8585
"react-native-webview": "13.13.5",
@@ -2359,7 +2359,7 @@
23592359

23602360
"react-native-svg": ["react-native-svg@15.12.0", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", "warn-once": "0.1.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-iE25PxIJ6V0C6krReLquVw6R0QTsRTmEQc4K2Co3P6zsimU/jltcDBKYDy1h/5j9S/fqmMeXnpM+9LEWKJKI6A=="],
23612361

2362-
"react-native-unistyles": ["react-native-unistyles@2.41.0", "", { "peerDependencies": { "@react-native/normalize-colors": "*", "react": "*", "react-native": "*", "react-native-macos": "*", "react-native-web": "*", "react-native-windows": "*" }, "optionalPeers": ["react-native-macos", "react-native-web", "react-native-windows"] }, "sha512-74AkP3JoXe6MEuMA430qvrehR6XVB7WSvYP5Nj/Tk/jnOfcHwgFLLEioly9LuR8GedoVoFzjMGpnFnqAitvH5g=="],
2362+
"react-native-unistyles": ["react-native-unistyles@2.32.0", "", { "peerDependencies": { "@react-native/normalize-colors": "*", "react": "*", "react-native": "*", "react-native-macos": "*", "react-native-web": "*", "react-native-windows": "*" }, "optionalPeers": ["react-native-macos", "react-native-web", "react-native-windows"] }, "sha512-/3Kp5gaOwcCtWv4vg5cxWyb/r8DiZqwlWTHF9A1lx3SQ/Lt7TW0ShDwXoaY6MxhVQTvLSe7GHcO1AX79TsLf3g=="],
23632363

23642364
"react-native-view-shot": ["react-native-view-shot@4.0.3", "", { "dependencies": { "html2canvas": "^1.4.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-USNjYmED7C0me02c1DxKA0074Hw+y/nxo+xJKlffMvfUWWzL5ELh/TJA/pTnVqFurIrzthZDPtDM7aBFJuhrHQ=="],
23652365

ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ PODS:
17921792
- Yoga
17931793
- react-native-safe-area-context (5.4.0):
17941794
- React-Core
1795-
- react-native-unistyles (2.41.0):
1795+
- react-native-unistyles (2.32.0):
17961796
- DoubleConversion
17971797
- glog
17981798
- hermes-engine
@@ -2873,7 +2873,7 @@ SPEC CHECKSUMS:
28732873
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
28742874
react-native-pager-view: b0e72a15b38577b9b87d4162fe277d0ad37ed67d
28752875
react-native-safe-area-context: 9d72abf6d8473da73033b597090a80b709c0b2f1
2876-
react-native-unistyles: e7e9efa670467c81e644dae035d6dab0bfd43b5a
2876+
react-native-unistyles: 5d8bcc8545cf31905a9e80216cd886aa3e4633e2
28772877
react-native-view-shot: ba0ecb57bf0407e034cb39f4b6677743e2dcfa4a
28782878
react-native-webview: 5adf9651c678f00ee1b2c3f4f74565c9a9236cab
28792879
React-NativeModulesApple: df8e5bc59e78ca3040ffbf41336889f3bd0fad68

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"react-native-screens": "^4.10.0",
100100
"react-native-select-dropdown": "^4.0.1",
101101
"react-native-svg": "15.12.0",
102-
"react-native-unistyles": "^2.41.0",
102+
"react-native-unistyles": "2.32.0",
103103
"react-native-view-shot": "~4.0.3",
104104
"react-native-web": "^0.20.0",
105105
"react-native-webview": "13.13.5",

src/app/(screens)/lecturer.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ export default function LecturerDetail(): React.JSX.Element {
5858
disabled: lecturer?.room_short === '',
5959
textColor: theme.colors.primary,
6060
onPress: () => {
61-
router.dismissTo({
62-
pathname: '/(tabs)/map',
63-
params: { room: lecturer?.room_short ?? '' }
64-
})
61+
if (lecturer?.room_short) {
62+
router.dismiss()
63+
router.push({
64+
pathname: '/(tabs)/map',
65+
params: { room: lecturer.room_short }
66+
})
67+
}
6568
}
6669
},
6770
{

src/components/Rows/LecturerRow.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ const LecturerRow = ({
1818
(state) => state.setSelectedLecturer
1919
)
2020
const onPressRoom = (): void => {
21-
router.dismissTo({
22-
pathname: '/(tabs)/map',
23-
params: { room: item.room_short ?? '' }
24-
})
21+
if (item.room_short) {
22+
router.dismiss()
23+
router.push({
24+
pathname: '/map',
25+
params: { room: item.room_short }
26+
})
27+
}
2528
}
2629
const onPressRow = (): void => {
2730
setSelectedLecturer(item)

src/components/Settings/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { createStyleSheet, useStyles } from 'react-native-unistyles'
1717
* @returns A JSX element representing the Avatar component.
1818
*/
1919
const Avatar = ({
20-
size = 50,
20+
size = 55,
2121
background,
2222
children,
2323
style

src/components/Settings/NameBox.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ const NameBox = ({
5353
{showChevron && (
5454
<View style={styles.chevronContainer}>
5555
<PlatformIcon
56-
ios={{ name: 'chevron.forward', size: 16 }}
57-
android={{ name: 'chevron_right', size: 26 }}
58-
web={{ name: 'ChevronRight', size: 26 }}
56+
ios={{ name: 'chevron.forward', size: 20 }}
57+
android={{ name: 'chevron_right', size: 28 }}
58+
web={{ name: 'ChevronRight', size: 28 }}
5959
style={styles.chevronIcon}
6060
/>
6161
</View>
@@ -82,7 +82,7 @@ const stylesheet = createStyleSheet((theme) => ({
8282
maxWidth: '92%'
8383
},
8484
subtitle: {
85-
color: theme.colors.text,
85+
color: theme.colors.labelColor,
8686
fontSize: 12,
8787
lineHeight: 14,
8888
overflow: 'hidden'

src/components/Settings/SettingsHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default function SettingsHeader({
224224

225225
const stylesheet = createStyleSheet((theme) => ({
226226
avatarText: {
227-
fontSize: 20,
227+
fontSize: 22,
228228
fontWeight: 'bold'
229229
},
230230
container: {
@@ -254,7 +254,7 @@ const stylesheet = createStyleSheet((theme) => ({
254254
},
255255
nameInnerContainer: {
256256
flexDirection: 'row',
257-
paddingVertical: 12,
257+
paddingVertical: 15,
258258
width: '100%'
259259
},
260260
nameOuterContainer: { flexDirection: 'column', flex: 1 }

src/data/licenses.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@
436436
"licenseUrl": "https://github.com/react-native-community/react-native-svg/raw/master/LICENSE",
437437
"parents": "neuland"
438438
},
439-
"react-native-unistyles@2.41.0": {
439+
"react-native-unistyles@2.32.0": {
440440
"licenses": "MIT",
441441
"repository": "https://github.com/jpudysz/react-native-unistyles",
442442
"licenseUrl": "https://github.com/jpudysz/react-native-unistyles/raw/master/LICENSE",

0 commit comments

Comments
 (0)