Skip to content

Commit

Permalink
fix(ts): fixed types in News.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
camarm-dev committed Oct 19, 2024
1 parent 396c744 commit c96dc37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/views/account/News/Atoms/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ interface NewsListItemProps {
index: number
message: NewsItem
navigation: NativeStackNavigationProp<RouteParameters, "News", undefined>
route: RouteProp<RouteParameters, "News">
isED: boolean
parentMessages: NewsItem[]
}

const NewsListItem: React.FC<NewsListItemProps> = ({ index, message, navigation, parentMessages, route }) => {
const NewsListItem: React.FC<NewsListItemProps> = ({ index, message, navigation, parentMessages, isED }) => {
const theme = useTheme();
const isED = route.params?.isED || false;

return (
<NativeItem
onPress={() => {
Expand Down
2 changes: 2 additions & 0 deletions src/views/account/News/News.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import TabAnimatedTitle from "@/components/Global/TabAnimatedTitle";
import { protectScreenComponent } from "@/router/helpers/protected-screen";
import MissingItem from "@/components/Global/MissingItem";
import {Information} from "@/services/shared/Information";
import {AccountService} from "@/stores/account/types";

type NewsItem = Omit<Information, "date"> & { date: string, important: boolean };

Expand Down Expand Up @@ -66,6 +67,7 @@ const NewsScreen: Screen<"News"> = ({ route, navigation }) => {
message={item}
navigation={navigation}
parentMessages={sortedMessages}
isED={account.service == AccountService.EcoleDirecte}
/>
), [navigation, sortedMessages]);

Expand Down

0 comments on commit c96dc37

Please sign in to comment.