Skip to content

Commit

Permalink
refactor(calendar-view): remove unused link
Browse files Browse the repository at this point in the history
  • Loading branch information
hudy9x committed Jul 10, 2024
1 parent 2c000ec commit f684b9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { useStatusData } from '@/hooks/useStatusData'
import CalTaskInMonth from './CalTaskInMonth'
import { ICalendarView, useCalendarContext } from './context'
import CalTaskInWeek from './CalTaskInWeek'
import Link from 'next/link'
import useTaskFilterContext from '@/features/TaskFilter/useTaskFilterContext'
import { TaskType } from '@prisma/client'
import { pushState } from 'packages/ui-app/libs/pushState'

interface ICalMonthTaskProps {
id: string
link: string
title: string
type: TaskType
time: string
Expand All @@ -22,7 +20,6 @@ interface ICalMonthTaskProps {

export default function CalMonthTask({
index,
link,
type: taskType,
time,
id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { useTaskStore } from '@/store/task'
import CalMonthTask from './CalMonthTask'
import { isEqual } from 'date-fns'
import Link from 'next/link'
import { useParams } from 'next/navigation'
import { useUrl } from '@/hooks/useUrl'
import { useTaskFilter } from '@/features/TaskFilter/context'
import differenceInDays from 'date-fns/differenceInDays'
import { TaskType } from '@prisma/client'

Expand All @@ -13,10 +9,6 @@ let index = 0

export default function CalMonthTaskList({ day }: { day: Date }) {
const { tasks } = useTaskStore()
const { orgName, projectId } = useParams()
const { getSp } = useUrl()

const mode = getSp('mode')

const dateClasses: string[] = []
if (day && differenceInDays(new Date(day), new Date()) < 0) {
Expand Down Expand Up @@ -47,7 +39,7 @@ export default function CalMonthTaskList({ day }: { day: Date }) {

return (
<CalMonthTask
link={`${orgName}/project/${projectId}?mode=${mode}&taskId=${task.id}`}
// link={`${orgName}/project/${projectId}?mode=${mode}&taskId=${task.id}`}
key={task.id}
type={task.type || TaskType.TASK}
time={time}
Expand Down

0 comments on commit f684b9a

Please sign in to comment.