mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-30 18:34:22 +01:00 
			
		
		
		
	Fix language selection (#726)
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| import { AppState } from "./types"; | ||||
| import { getDateTime } from "./utils"; | ||||
| import { getLanguage } from "./i18n"; | ||||
|  | ||||
| const DEFAULT_PROJECT_NAME = `excalidraw-${getDateTime()}`; | ||||
|  | ||||
| @@ -28,6 +29,7 @@ export function getDefaultAppState(): AppState { | ||||
|     name: DEFAULT_PROJECT_NAME, | ||||
|     isResizing: false, | ||||
|     selectionElement: null, | ||||
|     lng: getLanguage(), | ||||
|   }; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1820,7 +1820,7 @@ export class App extends React.Component<any, AppState> { | ||||
|           <LanguageList | ||||
|             onChange={lng => { | ||||
|               setLanguage(lng); | ||||
|               this.setState({}); | ||||
|               this.setState({ lng }); | ||||
|             }} | ||||
|             languages={languages} | ||||
|             currentLanguage={getLanguage()} | ||||
|   | ||||
| @@ -27,4 +27,5 @@ export type AppState = { | ||||
|   name: string; | ||||
|   selectedId?: string; | ||||
|   isResizing: boolean; | ||||
|   lng: string; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 BM
					BM