Skip to content

Commit 012b32f

Browse files
committed
fix(timetable): ensure current date fallback is correctly set in TimetableWeek component
1 parent 2576002 commit 012b32f

File tree

5 files changed

+40
-17
lines changed

5 files changed

+40
-17
lines changed

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [unreleased]
5+
## [0.11.0](https://github.com/neuland-ingolstadt/neuland.app-native/compare/0.10.1..0.11.0) - 2024-12-26
66

77
### 🚀 Features
88

@@ -14,13 +14,17 @@ All notable changes to this project will be documented in this file.
1414
- _(error)_ Include current pathname in feedback email content - by @Robert27 ([442b861](https://github.com/neuland-ingolstadt/neuland.app-native/commit/442b86160993a2b80f08ca8ae3f26d935b5ce6d7))
1515
- _(events)_ Replace static club data with api data - by @Robert27 ([a17bd68](https://github.com/neuland-ingolstadt/neuland.app-native/commit/a17bd68ca25e3a2d043adf310f32ac45829dee70))
1616
- _(grades, profile)_ Add app state handling for privacy visibility - by @Robert27 ([7e4b463](https://github.com/neuland-ingolstadt/neuland.app-native/commit/7e4b463425d2da5fccd6bf3745fa40361553b755))
17+
- _(library)_ Remove booking and add new sheet ([#153](https://github.com/neuland-ingolstadt/neuland.app-native/issues/153)) - by @Robert27 ([9b60ac4](https://github.com/neuland-ingolstadt/neuland.app-native/commit/9b60ac49d3a702a1f36c0b4d69aa990e848b52d1))
1718
- _(links)_ Add pressreader link - by @Robert27 ([15e8b9a](https://github.com/neuland-ingolstadt/neuland.app-native/commit/15e8b9a388f25f9123717072aba8c976f51d9034))
1819
- _(localization)_ Add missing error strings for unavailable app icons (german) - by @Robert27 ([1830bc7](https://github.com/neuland-ingolstadt/neuland.app-native/commit/1830bc7eee705e5d04aeb673d816f06ccd98d779))
1920
- _(news)_ Add NewsCard component with carousel - by @Robert27 ([7eeea3f](https://github.com/neuland-ingolstadt/neuland.app-native/commit/7eeea3facc0a62eff78902f2332cd14112869f5c))
2021
- _(store)_ Implement Zustand stores for session and route parameters management - by @Robert27 ([bd40f70](https://github.com/neuland-ingolstadt/neuland.app-native/commit/bd40f70bbdaeeb5339a70764c2fd9731fbbe90bd))
2122
- _(timetable)_ Migrate week view to new library - by @Robert27 ([4b2ce49](https://github.com/neuland-ingolstadt/neuland.app-native/commit/4b2ce49650181d18ff7ddcb6e6c680bb2ac1b830))
23+
- _(timetable)_ Add exams to timetable - by @Robert27 ([a767607](https://github.com/neuland-ingolstadt/neuland.app-native/commit/a767607e9952a914bce8af8da39186308e94f1b4))
2224
- _(ui)_ Integrate edge-to-edge layout on android - by @Robert27 ([563f55e](https://github.com/neuland-ingolstadt/neuland.app-native/commit/563f55e5799402a1b999f19d7144ebff218ee1e9))
2325
- Add react native web support ([#141](https://github.com/neuland-ingolstadt/neuland.app-native/issues/141)) - by @Robert27 ([c688528](https://github.com/neuland-ingolstadt/neuland.app-native/commit/c688528d0e7e2a9b018f9362fa746623415841a7))
26+
- Add one and five day timetable layout option ([#155](https://github.com/neuland-ingolstadt/neuland.app-native/issues/155)) - by @Robert27 ([6b119d7](https://github.com/neuland-ingolstadt/neuland.app-native/commit/6b119d70ccfa7a1cf2aba7166a98eb6156eacd86))
27+
- Valid event locations now link to map ([#138](https://github.com/neuland-ingolstadt/neuland.app-native/issues/138)) - by @ManInDark ([2576002](https://github.com/neuland-ingolstadt/neuland.app-native/commit/25760021bfd3c049e3cea16453b0251cbacfe068))
2428

2529
### 🐛 Bug Fixes
2630

@@ -36,6 +40,7 @@ All notable changes to this project will be documented in this file.
3640
- _(lecture)_ Restore lecture detail navigation - by @Robert27 ([b3b235f](https://github.com/neuland-ingolstadt/neuland.app-native/commit/b3b235f076d29f925ba6b8e54822490dcb498739))
3741
- _(lecture)_ Handle null exam values - by @Robert27 ([4e99ad6](https://github.com/neuland-ingolstadt/neuland.app-native/commit/4e99ad61d0aaddca04b9de88bfbfd6548dc51c21))
3842
- _(lecturers)_ Add SafeAreaView for improved searchbar layout - by @Robert27 ([0258113](https://github.com/neuland-ingolstadt/neuland.app-native/commit/0258113f5810fd854f9ffc5adb08ce4efe6b83ca))
43+
- _(library)_ Correct typo in component name - by @Robert27 ([af943cb](https://github.com/neuland-ingolstadt/neuland.app-native/commit/af943cb3cbaf7645608c7992d441e955f8f0b451))
3944
- _(map)_ Improve color handling for platform compatibility - by @Robert27 ([fb7a950](https://github.com/neuland-ingolstadt/neuland.app-native/commit/fb7a95044887be566d0b91f4eee070bef8640ec4))
4045
- _(map)_ Correct query key for fetching free rooms - by @Robert27 ([e08418a](https://github.com/neuland-ingolstadt/neuland.app-native/commit/e08418a6fdf02a5711756955ad418c51336f9868))
4146
- _(map)_ Fix laggy map bottom sheet animation - by @Robert27 ([456a9db](https://github.com/neuland-ingolstadt/neuland.app-native/commit/456a9db68d9248b0b1c14a5ee458ce4a562a2998))
@@ -48,10 +53,17 @@ All notable changes to this project will be documented in this file.
4853
- _(store)_ Add reset functionality to preferences store and streamline initial state setup - by @Robert27 ([fdcc4ee](https://github.com/neuland-ingolstadt/neuland.app-native/commit/fdcc4eef14c2b2e96618cd0a8cb1b112ffd78a38))
4954
- _(tabs)_ Revert android header styles - by @Robert27 ([a180834](https://github.com/neuland-ingolstadt/neuland.app-native/commit/a180834c253b1b85d4c5890e4be456ebb0e0310d))
5055
- _(timetable)_ Add end time for timetable week view - by @Robert27 ([5406bb2](https://github.com/neuland-ingolstadt/neuland.app-native/commit/5406bb2d7f916d34c888f9910485137cb527bd1a))
56+
- _(timetable)_ Ensure current date fallback is correctly set in TimetableWeek component - by @Robert27 ([7ac14ff](https://github.com/neuland-ingolstadt/neuland.app-native/commit/7ac14ffd789c309fd06f4e73cef8dd858e8a056a))
5157
- _(web)_ Enhance styling and add missing icons - by @Robert27 ([a806afb](https://github.com/neuland-ingolstadt/neuland.app-native/commit/a806afb9ea611c45592087eebe7a2e330eb709fb))
58+
- _(web)_ Add navigation buttons for week view - by @Robert27 ([760d2e8](https://github.com/neuland-ingolstadt/neuland.app-native/commit/760d2e8aab85552427b7b1d9f8431605ae6b4804))
5259
- Update Pressable components to use onPressOut for improved touch handling - by @Robert27 ([69d31ff](https://github.com/neuland-ingolstadt/neuland.app-native/commit/69d31ffe2272474e13b740da860b6bbdc922517f))
5360
- On web, do not send user agent to anonymous THI API (because of their CORS policy) - by @M4GNV5 ([1ce6147](https://github.com/neuland-ingolstadt/neuland.app-native/commit/1ce6147da57bcf634a34dbd955fc57dc62358d4a))
5461
- Allow bug reports for web issues - by @M4GNV5 ([5e1204a](https://github.com/neuland-ingolstadt/neuland.app-native/commit/5e1204ad50c4e9ba9603ed03d58c9bc087f889e0))
62+
- Enhance FoodCard to include restaurant location and improve web tab bar styling - by @Robert27 ([e2ce5f7](https://github.com/neuland-ingolstadt/neuland.app-native/commit/e2ce5f7e43eb18456500f45fa2c8f9379d28ab2d))
63+
- Update TypeScript settings, improve layout margins, and enhance localization for events - by @Robert27 ([92e30c7](https://github.com/neuland-ingolstadt/neuland.app-native/commit/92e30c718cbbbf3e26eeb744aef1ac20427368d3))
64+
- Update styles for calendar components and adjust margins in event screens - by @Robert27 ([68656f0](https://github.com/neuland-ingolstadt/neuland.app-native/commit/68656f08e51fd7691dc5d566f9540fb3c8231332))
65+
- Improve filter logic to handle exams correctly - by @Robert27 ([c0f1632](https://github.com/neuland-ingolstadt/neuland.app-native/commit/c0f163248cd6c7fca6edec43bf00d51a18e1f2e4))
66+
- Refactor MealDay component to streamline styles and improve rendering logic - by @Robert27 ([1eaf3a9](https://github.com/neuland-ingolstadt/neuland.app-native/commit/1eaf3a9e7644330c75dde78f4a5f37749c0ce4d7))
5567

5668
### 🚜 Refactor
5769

@@ -61,6 +73,10 @@ All notable changes to this project will be documented in this file.
6173
- _(map)_ Break down into several components - by @Robert27 ([6fa15e3](https://github.com/neuland-ingolstadt/neuland.app-native/commit/6fa15e3512ccba9ae63746a8c6f4f33d245b76c5))
6274
- _(router)_ Replace push with navigate for consistent routing - by @Robert27 ([66be9f2](https://github.com/neuland-ingolstadt/neuland.app-native/commit/66be9f287526d9898d38fcf63a3c522ca31c25a5))
6375

76+
### 📚 Documentation
77+
78+
- Add web specific instructions - by @Robert27 ([c117040](https://github.com/neuland-ingolstadt/neuland.app-native/commit/c117040a66fc99078a5b0ed74fce813f878c44e0))
79+
6480
### ⚡ Performance
6581

6682
- _(app)_ Add Zustand store for route parameters management - by @Robert27 ([534b571](https://github.com/neuland-ingolstadt/neuland.app-native/commit/534b5717e53ccf00a3873c2feba7cd68675e8ab2))
@@ -72,6 +88,7 @@ All notable changes to this project will be documented in this file.
7288

7389
- _(calendar)_ Improves semester dates section name - by @Robert27 ([7422009](https://github.com/neuland-ingolstadt/neuland.app-native/commit/7422009bb7f147e5afdd3cd3dd5a00f8878f90e0))
7490
- _(map)_ Add uniform indicator style for BottomSheet components - by @Robert27 ([3fa68d0](https://github.com/neuland-ingolstadt/neuland.app-native/commit/3fa68d073dd1b2466bb59053b0b6fb1609b01114))
91+
- _(web)_ Improve tabbar styles based on screen width - by @Robert27 ([11b027b](https://github.com/neuland-ingolstadt/neuland.app-native/commit/11b027b5d44a0ca4ffae93ff0c94c4bce6dab4dd))
7592
- Migrate to Unistyles for improved theming and code style ([#119](https://github.com/neuland-ingolstadt/neuland.app-native/issues/119)) - by @Robert27 ([eb33b85](https://github.com/neuland-ingolstadt/neuland.app-native/commit/eb33b85fda148edd76aab84617df97da20037bec))
7693

7794
### ⚙️ Miscellaneous Tasks
@@ -80,11 +97,17 @@ All notable changes to this project will be documented in this file.
8097
- _(git)_ Update issue templates - by @Robert27 ([c907232](https://github.com/neuland-ingolstadt/neuland.app-native/commit/c9072328c7b98aa5b43deef4747bdddbaba424e5))
8198
- Upgrade to React Native 0.76 and Expo SDK 52 ([#123](https://github.com/neuland-ingolstadt/neuland.app-native/issues/123)) - by @Robert27 ([ea90005](https://github.com/neuland-ingolstadt/neuland.app-native/commit/ea900052c50347eafdc79fe65f4849415f15fe39))
8299
- Update deployment workflows to specify distinct image names for docs and webapp - by @Robert27 ([c47f73e](https://github.com/neuland-ingolstadt/neuland.app-native/commit/c47f73ef194ee8c392ff1c8d708fa8caae19c68b))
100+
- Update git cliff to remove gitmoji symbols - by @Robert27 ([5c1b26f](https://github.com/neuland-ingolstadt/neuland.app-native/commit/5c1b26f8d72586f032319ff7d744cc397fdec364))
101+
- Update issue templates; remove feature request template - by @Robert27 ([0549f80](https://github.com/neuland-ingolstadt/neuland.app-native/commit/0549f801e205647566965bdd9e9420c41a41a630))
102+
- Update .prettierignore to exclude vitepress docs and generated files - by @Robert27 ([42de524](https://github.com/neuland-ingolstadt/neuland.app-native/commit/42de524c71abfaf1d230f6497762e2dc792a11d8))
83103

84104
### 💚 New Contributors
85105

106+
- @ManInDark made their first contribution in [#138](https://github.com/neuland-ingolstadt/neuland.app-native/pull/138)
86107
- @M4GNV5 made their first contribution
87108

109+
**Full Changelog**: https://github.com/neuland-ingolstadt/neuland.app-native/compare/0.10.1...0.11.0
110+
88111
## [0.10.1](https://github.com/neuland-ingolstadt/neuland.app-native/compare/0.10.0..0.10.1) - 2024-11-09
89112

90113
### 🚀 Features

bun.lockb

672 Bytes
Binary file not shown.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
"@gorhom/bottom-sheet": "^5.0.6",
3434
"@howljs/calendar-kit": "^2.2.1",
3535
"@kichiyaki/react-native-barcode-generator": "^0.6.7",
36-
"@maplibre/maplibre-react-native": "^10.0.0-beta.13",
36+
"@maplibre/maplibre-react-native": "^10.0.0-beta.15",
3737
"@react-native-community/datetimepicker": "8.2.0",
3838
"@react-native-community/netinfo": "11.4.1",
39-
"@react-native-menu/menu": "^1.1.7",
39+
"@react-native-menu/menu": "^1.2.0",
4040
"@react-navigation/native": "^7.0.14",
4141
"@react-navigation/stack": "^7.1.1",
4242
"@shopify/flash-list": "1.7.2",
4343
"@tanstack/query-sync-storage-persister": "^5.62.9",
44-
"@tanstack/react-query": "^5.62.10",
45-
"@tanstack/react-query-persist-client": "^5.62.10",
44+
"@tanstack/react-query": "^5.62.11",
45+
"@tanstack/react-query-persist-client": "^5.62.11",
4646
"@th3rdwave/react-navigation-bottom-sheet": "0.3.2",
4747
"burnt": "^0.12.2",
4848
"color": "^4.2.3",
@@ -149,7 +149,7 @@
149149
"expo-dev-client": "~5.0.7",
150150
"graphql-codegen-typescript-operation-types": "^2.0.1",
151151
"husky": "^9.1.7",
152-
"lint-staged": "^15.2.11",
152+
"lint-staged": "^15.3.0",
153153
"prettier": "3.4.2",
154154
"prop-types": "^15.8.1",
155155
"typescript": "^5.7.2"

src/components/Timetable/TimetableWeek.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ export default function TimetableWeek({
3939
}: ITimetableViewProps): React.JSX.Element {
4040
const { styles, theme } = useStyles(stylesheet)
4141
const today = moment().startOf('day').toDate()
42-
const firstElementeDate = timetable.find(
43-
(entry: FriendlyTimetableEntry) =>
44-
moment(entry.startDate).startOf('day').toDate() >= today
45-
)?.startDate
42+
const firstElementeDate = new Date(
43+
timetable.find(
44+
(entry: FriendlyTimetableEntry) =>
45+
moment(entry.startDate).startOf('day').toDate() >= today
46+
)?.startDate ?? today
47+
)
4648
const calendarRef = useRef<CalendarKitHandle>(null)
4749
const setSelectedLecture = useRouteParamsStore(
4850
(state) => state.setSelectedLecture
@@ -52,9 +54,7 @@ export default function TimetableWeek({
5254
)
5355
const [events, setEvents] = React.useState<PackedEvent[]>([])
5456
const [calendarLoaded, setCalendarLoaded] = React.useState(false)
55-
const [currentDate, setCurrentDate] = React.useState(
56-
firstElementeDate ?? today
57-
)
57+
const [currentDate, setCurrentDate] = React.useState(firstElementeDate)
5858
const isDark = UnistylesRuntime.themeName === 'dark'
5959
const router = useRouter()
6060
const navigation = useNavigation()

src/data/licenses.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"licenseUrl": "https://github.com/Kichiyaki/react-native-barcode-generator/raw/master/LICENSE",
4848
"parents": "neuland"
4949
},
50-
"@maplibre/maplibre-react-native@10.0.0-beta.13": {
50+
"@maplibre/maplibre-react-native@10.0.0-beta.15": {
5151
"licenses": "MIT",
5252
"repository": "https://github.com/maplibre/maplibre-react-native",
5353
"licenseUrl": "https://github.com/maplibre/maplibre-react-native/raw/master/LICENSE.md",
@@ -65,7 +65,7 @@
6565
"licenseUrl": "https://github.com/react-native-netinfo/react-native-netinfo/raw/master/LICENSE",
6666
"parents": "neuland"
6767
},
68-
"@react-native-menu/menu@1.1.7": {
68+
"@react-native-menu/menu@1.2.0": {
6969
"licenses": "MIT",
7070
"repository": "https://github.com/react-native-menu/menu",
7171
"licenseUrl": "https://github.com/react-native-menu/menu/raw/master/LICENSE",
@@ -95,13 +95,13 @@
9595
"licenseUrl": "https://github.com/TanStack/query/raw/master/LICENSE",
9696
"parents": "neuland"
9797
},
98-
"@tanstack/react-query-persist-client@5.62.10": {
98+
"@tanstack/react-query-persist-client@5.62.11": {
9999
"licenses": "MIT",
100100
"repository": "https://github.com/TanStack/query",
101101
"licenseUrl": "https://github.com/TanStack/query/raw/master/LICENSE",
102102
"parents": "neuland"
103103
},
104-
"@tanstack/react-query@5.62.10": {
104+
"@tanstack/react-query@5.62.11": {
105105
"licenses": "MIT",
106106
"repository": "https://github.com/TanStack/query",
107107
"licenseUrl": "https://github.com/TanStack/query/raw/master/LICENSE",

0 commit comments

Comments
 (0)