refactor: reduce code duplication

This commit is contained in:
Maze Winther
2025-09-01 16:19:14 +02:00
parent 350b55081c
commit dd02e31380
2 changed files with 3 additions and 8 deletions
@@ -13,6 +13,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Progress } from "@/components/ui/progress";
import { createMainScene } from "@/stores/project-store";
interface MigrationProgress {
current: number;
@@ -87,13 +88,7 @@ export function ScenesMigrator({ children }: { children: React.ReactNode }) {
const migrateLegacyProject = async (project: TProject) => {
try {
const mainScene: Scene = {
id: generateUUID(),
name: "Main Scene",
isMain: true,
createdAt: new Date(),
updatedAt: new Date(),
};
const mainScene = createMainScene();
const migratedProject: TProject = {
...project,