Skip to content

Commit

Permalink
Remove custom expiration dates (#2206)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwallacespeckle authored Apr 15, 2024
1 parent a0424fd commit 11a04b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
13 changes: 3 additions & 10 deletions packages/frontend-2/components/projects/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ import { useActiveUser } from '~~/lib/auth/composables/activeUser'
import type { InfiniteLoaderState } from '~~/lib/global/helpers/components'
import type { Nullable, Optional, StreamRoles } from '@speckle/shared'
import { useSynchronizedCookie } from '~~/lib/common/composables/reactiveCookie'
import dayjs from 'dayjs'
const onUserProjectsUpdateSubscription = graphql(`
subscription OnUserProjectsUpdate {
Expand Down Expand Up @@ -265,15 +264,10 @@ watch(search, (newVal) => {
watch(areQueriesLoading, (newVal) => (showLoadingBar.value = newVal))
function getFutureDateByDays(daysToAdd: number) {
return dayjs().add(daysToAdd, 'day').toDate()
}
const hasCompletedChecklistV1 = useSynchronizedCookie<boolean>(
`hasCompletedChecklistV1`,
{
default: () => false,
expires: getFutureDateByDays(999)
default: () => false
}
)
Expand All @@ -285,8 +279,7 @@ const hasDismissedChecklistTime = useSynchronizedCookie<string | undefined>(
const hasDismissedChecklistForever = useSynchronizedCookie<boolean | undefined>(
`hasDismissedChecklistForever`,
{
default: () => false,
expires: getFutureDateByDays(999)
default: () => false
}
)
Expand All @@ -299,7 +292,7 @@ const hasDismissedChecklistTimeAgo = computed(() => {
const hasDismissedNewSpeckleBanner = useSynchronizedCookie<boolean | undefined>(
`hasDismissedNewSpeckleBanner`,
{ default: () => false, expires: getFutureDateByDays(999) }
{ default: () => false }
)
const showChecklist = computed(() => {
Expand Down
3 changes: 1 addition & 2 deletions packages/frontend-2/plugins/survicate.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ function useInitMainSurvey() {
const onboardingOrFeedbackDateString = useSynchronizedCookie<string | undefined>(
'onboardingOrFeedbackDate',
{
default: () => dayjs().startOf('day').format('YYYY-MM-DD'),
expires: dayjs().add(999, 'day').toDate()
default: () => dayjs().startOf('day').format('YYYY-MM-DD')
}
)
const { projectVersionCount } = useActiveUser()
Expand Down

0 comments on commit 11a04b0

Please sign in to comment.