We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efbc0a9 commit bb4e33aCopy full SHA for bb4e33a
web/composables/useCreateNewProject.ts
@@ -1,8 +1,8 @@
1
export default function () {
2
const { openDialog } = useDialogState();
3
const openProjectIds = useOpenProjectIds();
4
- const allProjects = useProjects();
5
const router = useRouter();
+ const accountService = useAccountService();
6
7
const createNewProject = () =>
8
new Promise<Project>((res, rej) => {
@@ -15,7 +15,7 @@ export default function () {
15
16
return async () => {
17
const project = await createNewProject();
18
- allProjects.value.push(project);
+ await accountService.value.saveProject(project);
19
openProjectIds.value.push(project.id);
20
router.push(`/p/${project.id}`);
21
};
0 commit comments