chore(lint): no-shadow in use-dictation, hoist icons in splash screen

This commit is contained in:
Mohamed Boudra
2026-04-24 05:03:43 +07:00
parent 413ef0258b
commit b51012689c
2 changed files with 23 additions and 22 deletions

View File

@@ -155,8 +155,8 @@ export function useDictation(options: UseDictationOptions): UseDictationResult {
if (!isRecordingRef.current) {
return;
}
void startNewStream("reconnect").catch((error) => {
reportError(error, "Failed to restart dictation stream after reconnect");
void startNewStream("reconnect").catch((err) => {
reportError(err, "Failed to restart dictation stream after reconnect");
});
});
}, [client, reportError, startNewStream]);

View File

@@ -266,6 +266,23 @@ export function StartupSplashScreen({ bootstrapState }: StartupSplashScreenProps
void Clipboard.setStringAsync(payload);
}, [daemonLogs?.logPath, daemonLogs?.contents, logsText]);
const copyIcon = useMemo(
() => <Copy size={16} color={theme.colors.foreground} />,
[theme.colors.foreground],
);
const warningIcon = useMemo(
() => <TriangleAlert size={16} color={theme.colors.foreground} />,
[theme.colors.foreground],
);
const bookIcon = useMemo(
() => <BookOpen size={16} color={theme.colors.foreground} />,
[theme.colors.foreground],
);
const retryIcon = useMemo(
() => <RotateCw size={16} color={theme.colors.palette.white} />,
[theme.colors.palette.white],
);
if (isSimpleSplash) {
return (
<View style={styles.container}>
@@ -336,32 +353,16 @@ export function StartupSplashScreen({ bootstrapState }: StartupSplashScreenProps
</View>
<View style={styles.actionRow}>
<Button
variant="secondary"
leftIcon={<Copy size={16} color={theme.colors.foreground} />}
onPress={handleCopyLogs}
>
<Button variant="secondary" leftIcon={copyIcon} onPress={handleCopyLogs}>
Copy logs
</Button>
<Button
variant="outline"
leftIcon={<TriangleAlert size={16} color={theme.colors.foreground} />}
onPress={openGithubIssue}
>
<Button variant="outline" leftIcon={warningIcon} onPress={openGithubIssue}>
Open GitHub issue
</Button>
<Button
variant="outline"
leftIcon={<BookOpen size={16} color={theme.colors.foreground} />}
onPress={openDocs}
>
<Button variant="outline" leftIcon={bookIcon} onPress={openDocs}>
Docs
</Button>
<Button
variant="default"
leftIcon={<RotateCw size={16} color={theme.colors.palette.white} />}
onPress={bootstrapState.retry}
>
<Button variant="default" leftIcon={retryIcon} onPress={bootstrapState.retry}>
Retry
</Button>
</View>