Adds debugging information to stories

This commit is contained in:
Josh Perez 2022-07-25 14:55:44 -04:00 committed by GitHub
parent badf9d7dda
commit 06476de6c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 1089 additions and 530 deletions

View file

@ -34,6 +34,7 @@ enum Tab {
export type PropsType = {
authorTitle: string;
canReply: boolean;
getPreferredBadge: PreferredBadgeSelectorType;
i18n: LocalizerType;
isGroupStory?: boolean;
@ -59,6 +60,7 @@ export type PropsType = {
export const StoryViewsNRepliesModal = ({
authorTitle,
canReply,
getPreferredBadge,
i18n,
isGroupStory,
@ -76,7 +78,7 @@ export const StoryViewsNRepliesModal = ({
skinTone,
storyPreviewAttachment,
views,
}: PropsType): JSX.Element => {
}: PropsType): JSX.Element | null => {
const inputApiRef = useRef<InputApi | undefined>();
const [bottom, setBottom] = useState<HTMLDivElement | null>(null);
const [messageBodyText, setMessageBodyText] = useState('');
@ -117,7 +119,7 @@ export const StoryViewsNRepliesModal = ({
let composerElement: JSX.Element | undefined;
if (!isMyStory) {
if (!isMyStory && canReply) {
composerElement = (
<>
{!isGroupStory && (
@ -373,6 +375,10 @@ export const StoryViewsNRepliesModal = ({
</Tabs>
) : undefined;
if (!tabsElement && !viewsElement && !repliesElement && !composerElement) {
return null;
}
return (
<Modal
i18n={i18n}