diff --git a/apps/web/lib/features/task/task-filters.tsx b/apps/web/lib/features/task/task-filters.tsx index 12e631ae4..a519e2c17 100644 --- a/apps/web/lib/features/task/task-filters.tsx +++ b/apps/web/lib/features/task/task-filters.tsx @@ -18,7 +18,7 @@ import intersection from 'lodash/intersection'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { TaskUnOrAssignPopover } from './task-assign-popover'; import { TaskLabelsDropdown, TaskPropertiesDropdown, TaskSizesDropdown, TaskStatusDropdown } from './task-status'; -import { useTranslations } from 'next-intl'; +import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl'; import { SettingFilterIcon } from 'assets/svg'; import { DailyPlanFilter } from './daily-plan/daily-plan-filter'; import { Divider } from 'lib/components'; @@ -121,8 +121,8 @@ export function useTaskFilter(profile: I_UserProfilePage) { if (activeTeam?.shareProfileView || canSeeActivity) { tabs.push({ tab: 'dailyplan', - name: t('common.DAILYPLAN'), - description: t('task.tabFilter.DAILYPLAN_DESCRIPTION'), + name: t('common.DAILYPLAN'as DottedLanguageObjectStringPaths) , + description: t('task.tabFilter.DAILYPLAN_DESCRIPTION' as DottedLanguageObjectStringPaths), count: profile.tasksGrouped.planned }); tabs.push({ diff --git a/apps/web/lib/features/user-profile-plans.tsx b/apps/web/lib/features/user-profile-plans.tsx index 1bf59cb06..b7a36c468 100644 --- a/apps/web/lib/features/user-profile-plans.tsx +++ b/apps/web/lib/features/user-profile-plans.tsx @@ -32,12 +32,16 @@ import { handleDragAndDrop } from '@app/helpers/drag-and-drop'; import { DragDropContext, Droppable, Draggable, DroppableProvided, DroppableStateSnapshot } from 'react-beautiful-dnd'; import { useDateRange } from '@app/hooks/useDateRange'; import { checkPastDate } from 'lib/utils'; + +import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl'; import { useLocalStorageState } from '@app/hooks/useLocalStorageState'; + export type FilterTabs = 'Today Tasks' | 'Future Tasks' | 'Past Tasks' | 'All Tasks' | 'Outstanding'; type FilterOutstanding = 'ALL' | 'DATE'; export function UserProfilePlans() { + const t = useTranslations(); const defaultTab = typeof window !== 'undefined' ? (window.localStorage.getItem('daily-plan-tab') as FilterTabs) || null @@ -115,7 +119,7 @@ export function UserProfilePlans() { setCurrentTab(filter as FilterTabs); }} > - {filter} + {t(`task.tabFilter.${filter.toUpperCase().replace(' ', '_')}` as DottedLanguageObjectStringPaths)}