mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
adjustments
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
definePageMeta({ layout: 'dashboard' });
|
||||
|
||||
const projectName = ref<string>("");
|
||||
@@ -8,7 +7,7 @@ const creating = ref<boolean>(false);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const { data: projects, refresh: refreshProjects } = useProjectsList();
|
||||
const { projects, refresh } = useProjectsList();
|
||||
|
||||
const isFirstProject = computed(() => { return projects.value?.length == 0; })
|
||||
|
||||
@@ -37,7 +36,7 @@ async function createProject() {
|
||||
body: JSON.stringify({ name: projectName.value })
|
||||
});
|
||||
|
||||
await refreshProjects();
|
||||
await refresh();
|
||||
|
||||
const newActiveProjectId = projects.value?.[projects.value?.length - 1]._id.toString();
|
||||
if (newActiveProjectId) {
|
||||
@@ -45,9 +44,6 @@ async function createProject() {
|
||||
}
|
||||
|
||||
|
||||
await refreshProjects();
|
||||
|
||||
|
||||
router.push('/');
|
||||
|
||||
} catch (ex: any) {
|
||||
|
||||
Reference in New Issue
Block a user