feat: replace Text component with MarkdownContent for alert and incident descriptions

This commit is contained in:
Nawaz Dhandala
2026-02-21 12:49:09 +00:00
parent 1011f0704e
commit c6d13d3647
4 changed files with 8 additions and 36 deletions

View File

@@ -33,6 +33,7 @@ import SkeletonCard from "../components/SkeletonCard";
import SectionHeader from "../components/SectionHeader";
import NotesSection from "../components/NotesSection";
import RootCauseCard from "../components/RootCauseCard";
import MarkdownContent from "../components/MarkdownContent";
import { useHaptics } from "../hooks/useHaptics";
type Props = NativeStackScreenProps<AlertsStackParamList, "AlertDetail">;
@@ -337,15 +338,7 @@ export default function AlertDetailScreen({ route }: Props): React.JSX.Element {
borderColor: theme.colors.borderGlass,
}}
>
<Text
style={{
fontSize: 14,
lineHeight: 22,
color: theme.colors.textPrimary,
}}
>
{descriptionText}
</Text>
<MarkdownContent content={descriptionText} />
</View>
</View>
) : null}

View File

@@ -34,6 +34,7 @@ import FeedTimeline from "../components/FeedTimeline";
import SkeletonCard from "../components/SkeletonCard";
import SectionHeader from "../components/SectionHeader";
import NotesSection from "../components/NotesSection";
import MarkdownContent from "../components/MarkdownContent";
import { useHaptics } from "../hooks/useHaptics";
type Props = NativeStackScreenProps<AlertsStackParamList, "AlertEpisodeDetail">;
@@ -335,15 +336,7 @@ export default function AlertEpisodeDetailScreen({
borderColor: theme.colors.borderGlass,
}}
>
<Text
style={{
fontSize: 14,
lineHeight: 22,
color: theme.colors.textPrimary,
}}
>
{descriptionText}
</Text>
<MarkdownContent content={descriptionText} />
</View>
</View>
) : null}

View File

@@ -32,6 +32,7 @@ import SkeletonCard from "../components/SkeletonCard";
import SectionHeader from "../components/SectionHeader";
import NotesSection from "../components/NotesSection";
import RootCauseCard from "../components/RootCauseCard";
import MarkdownContent from "../components/MarkdownContent";
import { useHaptics } from "../hooks/useHaptics";
import type { IncidentItem, IncidentState, NamedEntity } from "../api/types";
@@ -351,15 +352,7 @@ export default function IncidentDetailScreen({
borderColor: theme.colors.borderGlass,
}}
>
<Text
style={{
fontSize: 14,
lineHeight: 22,
color: theme.colors.textPrimary,
}}
>
{descriptionText}
</Text>
<MarkdownContent content={descriptionText} />
</View>
</View>
) : null}

View File

@@ -35,6 +35,7 @@ import SkeletonCard from "../components/SkeletonCard";
import SectionHeader from "../components/SectionHeader";
import NotesSection from "../components/NotesSection";
import RootCauseCard from "../components/RootCauseCard";
import MarkdownContent from "../components/MarkdownContent";
import { useHaptics } from "../hooks/useHaptics";
type Props = NativeStackScreenProps<
@@ -344,15 +345,7 @@ export default function IncidentEpisodeDetailScreen({
borderColor: theme.colors.borderGlass,
}}
>
<Text
style={{
fontSize: 14,
lineHeight: 22,
color: theme.colors.textPrimary,
}}
>
{descriptionText}
</Text>
<MarkdownContent content={descriptionText} />
</View>
</View>
) : null}