Skip to content

Commit 8bc81b6

Browse files
committed
fix typescript compile errors
1 parent ad7c40f commit 8bc81b6

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

ui/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ function App() {
3434
contentEditable
3535
suppressContentEditableWarning
3636
className="flex items-center p-0 outline-none hover:bg-gray-100 dark:hover:bg-gray-700 rounded px-1"
37-
onBlur={(e) => handleTitleChange(e.currentTarget.textContent)}
37+
onBlur={(e) => handleTitleChange(e.currentTarget.textContent || "(set title)")}
3838
onKeyDown={(e) => {
3939
if (e.key === "Enter") {
4040
e.preventDefault();
41-
handleTitleChange(e.currentTarget.textContent);
41+
handleTitleChange(e.currentTarget.textContent || "(set title)");
4242
e.currentTarget.blur();
4343
}
4444
}}

ui/src/contexts/ThemeProvider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ type ThemeContextType = {
1212
// for managing the window title and connection state information
1313
appTitle: string;
1414
setAppTitle: (title: string) => void;
15-
connectionState: ConnectionState;
1615
setConnectionState: (state: ConnectionState) => void;
1716
};
1817

@@ -81,7 +80,6 @@ export function ThemeProvider({ children }: ThemeProviderProps) {
8180
isNarrow,
8281
appTitle,
8382
setAppTitle,
84-
connectionState,
8583
setConnectionState,
8684
}}
8785
>

ui/src/lib/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type ConnectionState = "connected" | "connecting" | "disconnected";

ui/src/lib/types.tsx

Whitespace-only changes.

0 commit comments

Comments
 (0)