Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

useReviewHeaderPresentation.android.ts

21 lines773 Bytes

1import type { useReviewHeaderPresentation as useIosReviewHeaderPresentation } from "./useReviewHeaderPresentation";
2​
3// oxlint-disable-next-line t3code/no-hookless-use-function -- Android stub of a hook; the iOS file calls hooks.
4export function useReviewHeaderPresentation(
5 props: Parameters<typeof useIosReviewHeaderPresentation>[0],
6): ReturnType<typeof useIosReviewHeaderPresentation> {
7 return {
8 title: "Review changes",
9 subtitle: props.androidSubtitle || "Select a diff",
10 gitMenu: null,
11 menuIcon: "ellipsis.circle",
12 refreshAction: {
13 id: "refresh",
14 title: "Refresh current diff",
15 disabled: !props.selectedSection || props.selectedSection.isLoading,
16 onPress: () => {
17 void props.onRefresh();
18 },
19 },
20 };