diff --git a/packages/excalidraw/actions/actionExport.tsx b/packages/excalidraw/actions/actionExport.tsx index 1fbf42025..a65b95832 100644 --- a/packages/excalidraw/actions/actionExport.tsx +++ b/packages/excalidraw/actions/actionExport.tsx @@ -19,7 +19,6 @@ import { nativeFileSystemSupported } from "../data/filesystem"; import { Theme } from "../element/types"; import "../components/ToolIcon.scss"; -import { getDateTime } from "../utils"; export const actionChangeProjectName = register({ name: "changeProjectName", @@ -30,7 +29,7 @@ export const actionChangeProjectName = register({ PanelComponent: ({ appState, updateData, appProps, data }) => ( updateData(name)} isNameEditable={ typeof appProps.name === "undefined" && !appState.viewModeEnabled diff --git a/packages/excalidraw/components/ProjectName.tsx b/packages/excalidraw/components/ProjectName.tsx index 1629f49cd..445b408a0 100644 --- a/packages/excalidraw/components/ProjectName.tsx +++ b/packages/excalidraw/components/ProjectName.tsx @@ -18,7 +18,9 @@ type Props = { export const ProjectName = (props: Props) => { const { id } = useExcalidrawContainer(); - const [fileName, setFileName] = useState(props.value); + const [fileName, setFileName] = useState( + props.value || `${t("labels.untitled")}-${getDateTime()}`, + ); const handleBlur = (event: any) => { if (!props.ignoreFocus) {