29 lines
1.2 KiB
TypeScript
29 lines
1.2 KiB
TypeScript
// Metro module 9285 (f9286).
|
|
import { View } from "react-native";
|
|
import ChannelStore from "../../../../stores/ChannelStore";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { useStateFromStores } from "../../../../_bundle/Module589";
|
|
import useChannelName from "../../../channel/useChannelName";
|
|
import { GenericHeaderTitle } from "../../../main_tabs_v2/native/shared_components/HeaderShared";
|
|
const useStyles = createStyles((a0) => ({
|
|
container: {
|
|
flex: 1,
|
|
paddingVertical: Module712.space.PX_16,
|
|
paddingRight: a0 ? 0 : Module712.space.PX_64,
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
}
|
|
}));
|
|
export default function ConversationNavigatorHeader(props) {
|
|
const { channelId, title, hasRightAction = false } = props;
|
|
const styles = useStyles(hasRightAction);
|
|
let subtitle = useChannelName(useStateFromStores([ChannelStore], () => ChannelStore.getChannel(channelId), [channelId]), true);
|
|
if (subtitle == null) {
|
|
subtitle = void 0;
|
|
}
|
|
return <View style={styles.container}>
|
|
<GenericHeaderTitle title={title} subtitle={subtitle} variant="heading-lg/semibold" subtitleColor="text-muted" />
|
|
</View>;
|
|
};
|