diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-25 16:47:22 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:48:22 +0200 |
| commit | 8db3bead13441a5882d8689dfc6a9f09c82375d9 (patch) | |
| tree | e9d0cafa93904ffcbec3188c37961bcc16c6422d /apps/web/src/components/editor/editor-header.tsx | |
| parent | 39ea298a9ccba3104c549c0ca079c231981811f5 (diff) | |
| download | opencut-8db3bead13441a5882d8689dfc6a9f09c82375d9.tar.gz | |
feat: masks, properties refactor, shaders, storage migrations, and more
Diffstat (limited to 'apps/web/src/components/editor/editor-header.tsx')
| -rw-r--r-- | apps/web/src/components/editor/editor-header.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/src/components/editor/editor-header.tsx b/apps/web/src/components/editor/editor-header.tsx index 2dea73e2..8dd730b5 100644 --- a/apps/web/src/components/editor/editor-header.tsx +++ b/apps/web/src/components/editor/editor-header.tsx @@ -47,7 +47,7 @@ function ProjectDropdown() { const [isExiting, setIsExiting] = useState(false); const router = useRouter(); const editor = useEditor(); - const activeProject = editor.project.getActive(); + const activeProject = useEditor((e) => e.project.getActive()); const handleExit = async () => { if (isExiting) return; @@ -136,7 +136,7 @@ function ProjectDropdown() { <DropdownMenuSeparator /> - <DropdownMenuItem asChild icon={<FaDiscord className="!size-4" />}> + <DropdownMenuItem asChild icon={<FaDiscord className="size-4!" />}> <Link href={SOCIAL_LINKS.discord} target="_blank" @@ -169,7 +169,7 @@ function ProjectDropdown() { function EditableProjectName() { const editor = useEditor(); - const activeProject = editor.project.getActive(); + const activeProject = useEditor((e) => e.project.getActive()); const [isEditing, setIsEditing] = useState(false); const inputRef = useRef<HTMLInputElement>(null); const originalNameRef = useRef(""); @@ -219,6 +219,7 @@ function EditableProjectName() { event.preventDefault(); if (inputRef.current) { inputRef.current.value = originalNameRef.current; + inputRef.current.setSelectionRange(0, 0); } setIsEditing(false); inputRef.current?.blur(); |
