Skip to content

Commit

Permalink
fix(firebase): Save projects to account
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Sep 2, 2024
1 parent efbc0a9 commit bb4e33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/composables/useCreateNewProject.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default function () {
const { openDialog } = useDialogState();
const openProjectIds = useOpenProjectIds();
const allProjects = useProjects();
const router = useRouter();
const accountService = useAccountService();

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

return async () => {
const project = await createNewProject();
allProjects.value.push(project);
await accountService.value.saveProject(project);
openProjectIds.value.push(project.id);
router.push(`/p/${project.id}`);
};
Expand Down

0 comments on commit bb4e33a

Please sign in to comment.