File tree Expand file tree Collapse file tree 4 files changed +3
-4
lines changed Expand file tree Collapse file tree 4 files changed +3
-4
lines changed Original file line number Diff line number Diff 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 } }
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change 1+ export type ConnectionState = "connected" | "connecting" | "disconnected" ;
You can’t perform that action at this time.
0 commit comments