feature/projects-all-the-way-down #3323
|
@ -32,7 +32,7 @@
|
|||
<ProjectCardGrid :projects="projectHistory" v-cy="'projectCardGrid'" />
|
||||
</div>
|
||||
<ShowTasks
|
||||
v-if="hasProjects"
|
||||
v-if="projectStore.hasProjects"
|
||||
class="show-tasks"
|
||||
:key="showTasksKey"
|
||||
/>
|
||||
|
@ -80,7 +80,6 @@ const projectHistory = computed(() => {
|
|||
|
||||
const migratorsEnabled = computed(() => configStore.availableMigrators?.length > 0)
|
||||
const hasTasks = computed(() => baseStore.hasTasks)
|
||||
const hasProjects = computed(() => projectStore.hasProjects)
|
||||
const loading = computed(() => taskStore.isLoading)
|
||||
konrad marked this conversation as resolved
Outdated
|
||||
const deletionScheduledAt = computed(() => parseDateOrNull(authStore.info?.deletionScheduledAt))
|
||||
|
||||
|
|
Reference in New Issue
Block a user
This should be a computed of the store, like
hasTasks
.Shouldn't we check the length here (
projectStore.projects?.length
)?projects
is an object, so checking the length of it won't work.Moved it to the store.
Then
Object.keys?.length
Wouldn't that cause a call to
Object.keys
? I think my solution is faster.Checked it: https://jsbench.me/hslfseq93y/1
Using
Object.keys
really is slower, and by a lot.True. Using a Map with size would probably be the perfect solution here. But that is something for another time.
Don't wrap computed in computed. use
projectStore.hasProjects
directlyDone