Skip to content

Commit

Permalink
fix: update package.json dependencies, improve filtering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Dec 13, 2024
1 parent 442748c commit 7fc2838
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"@expo/ngrok": "^4.1.3",
"@graphql-codegen/cli": "5.0.3",
"@graphql-codegen/client-preset": "4.5.1",
"@react-native-community/cli": "^15.1.3",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/bun": "latest",
"@types/color": "^3.0.6",
Expand Down
6 changes: 2 additions & 4 deletions src/app/(screens)/lecturers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ export default function LecturersCard(): JSX.Element {
let filtered: NormalizedLecturer[] = []
if (faculty !== null) {
filtered =
allLecturersResult?.data?.filter(
(lecturer: Lecturers) =>
lecturer.organisation !== null &&
lecturer.organisation.includes(faculty)
allLecturersResult?.data?.filter((lecturer: Lecturers) =>
lecturer.organisation?.includes(faculty)
) ?? []
setDisplayedProfessors(false)
setFacultyData(filtered)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Tabbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function TabLayout(): JSX.Element {
const isAndroid = Platform.OS === 'android'
return (
<Tabs
sidebarAdaptable
sidebarAdaptable={false}
tabBarActiveTintColor={theme.colors.primary}
barTintColor={
isAndroid
Expand All @@ -30,7 +30,7 @@ export default function TabLayout(): JSX.Element {
tabLabelStyle={{
fontSize: 11,
}}
labeled={true}
labeled
activeIndicatorColor={
isAndroid
? UnistylesRuntime.themeName === 'dark'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Universal/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createStyleSheet, useStyles } from 'react-native-unistyles'
import PlatformIcon from './Icon'

interface ShareButtonProps {
onPress?: () => void | Promise<void>
onPress?: () => void
}

export default function ShareButton({
Expand Down
6 changes: 3 additions & 3 deletions src/utils/food-utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getFragmentData } from '@/__generated__/gql'
import { FoodFieldsFragmentDoc } from '@/__generated__/gql/graphql'
import NeulandAPI from '@/api/neuland-api'
import { type FoodLanguage } from '@/contexts/foodFilter'
import allergenMap from '@/data/allergens.json'
import { USER_EMPLOYEE, USER_GUEST, USER_STUDENT } from '@/data/constants'
import flapMap from '@/data/mensa-flags.json'
import { type FoodLanguage } from '@/hooks/useFoodFilterStore'
import { type LanguageKey } from '@/localization/i18n'
import { type Food, type Meal, type Name } from '@/types/neuland-api'
import { type Labels, type Prices } from '@/types/utils'
Expand Down Expand Up @@ -157,9 +157,9 @@ export function mealName(
i18nLang: LanguageKey
): string {
if (foodLang !== 'default') {
return mealName[foodLang as LanguageKey]
return mealName[foodLang]
} else {
return mealName[i18nLang as LanguageKey]
return mealName[i18nLang]
}
}

Expand Down

0 comments on commit 7fc2838

Please sign in to comment.