Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 67c132d88b |
+6
-4
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
Pressable,
|
Pressable,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import { router } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
import { getIncidents } from "@/lib/db";
|
import { getIncidents } from "@/lib/db";
|
||||||
import { useSettings } from "@/hooks/useSettings";
|
import { useSettings } from "@/hooks/useSettings";
|
||||||
import type { Incident } from "@/types/incident";
|
import type { Incident } from "@/types/incident";
|
||||||
@@ -26,9 +26,11 @@ export default function HomeScreen() {
|
|||||||
}
|
}
|
||||||
}, [ready, settings.homeView]);
|
}, [ready, settings.homeView]);
|
||||||
|
|
||||||
useEffect(() => {
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
loadIncidents();
|
loadIncidents();
|
||||||
}, []);
|
}, [])
|
||||||
|
);
|
||||||
|
|
||||||
async function loadIncidents() {
|
async function loadIncidents() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|||||||
+2
-2
@@ -46,7 +46,7 @@ const LABEL_STYLE = {
|
|||||||
letterSpacing: 0.5,
|
letterSpacing: 0.5,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
type VoiceField = "title" | "symptom" | "rootCause" | "fix";
|
type VoiceField = "title" | "service" | "symptom" | "rootCause" | "fix";
|
||||||
|
|
||||||
export default function NewIncidentScreen() {
|
export default function NewIncidentScreen() {
|
||||||
const { editId } = useLocalSearchParams<{ editId?: string }>();
|
const { editId } = useLocalSearchParams<{ editId?: string }>();
|
||||||
@@ -224,7 +224,7 @@ export default function NewIncidentScreen() {
|
|||||||
returnKeyType="next"
|
returnKeyType="next"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text style={[LABEL_STYLE, { marginBottom: 6 }]}>Service</Text>
|
{labelRow("Service", "service")}
|
||||||
<TextInput
|
<TextInput
|
||||||
style={FIELD_STYLE}
|
style={FIELD_STYLE}
|
||||||
value={form.service}
|
value={form.service}
|
||||||
|
|||||||
Reference in New Issue
Block a user