Skip to content

Commit bb4e33a

Browse files
committed
fix(firebase): Save projects to account
1 parent efbc0a9 commit bb4e33a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/composables/useCreateNewProject.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default function () {
22
const { openDialog } = useDialogState();
33
const openProjectIds = useOpenProjectIds();
4-
const allProjects = useProjects();
54
const router = useRouter();
5+
const accountService = useAccountService();
66

77
const createNewProject = () =>
88
new Promise<Project>((res, rej) => {
@@ -15,7 +15,7 @@ export default function () {
1515

1616
return async () => {
1717
const project = await createNewProject();
18-
allProjects.value.push(project);
18+
await accountService.value.saveProject(project);
1919
openProjectIds.value.push(project.id);
2020
router.push(`/p/${project.id}`);
2121
};

0 commit comments

Comments
 (0)