diff --git a/bun.lockb b/bun.lockb index 2f631d96..0ff79246 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/web/app/components/sidebar/partials/link-collection.tsx b/web/app/components/sidebar/partials/link-collection.tsx index 6cbd591a..06c4b432 100644 --- a/web/app/components/sidebar/partials/link-collection.tsx +++ b/web/app/components/sidebar/partials/link-collection.tsx @@ -10,11 +10,13 @@ export const LinkCollection: React.FC = () => { topicsWantToLearn: [], topicsLearning: [], topicsLearned: [], + tasks: [], }, }) const linkCount = me?.root.personalLinks?.length || 0 const pageCount = me?.root.personalPages?.length || 0 + const taskCount = me?.root.tasks?.length || 0 const topicCount = (me?.root.topicsWantToLearn?.length || 0) + @@ -26,6 +28,12 @@ export const LinkCollection: React.FC = () => { + ) } diff --git a/web/app/components/sidebar/partials/link-section.tsx b/web/app/components/sidebar/partials/link-section.tsx index 0443f6ff..ee1be385 100644 --- a/web/app/components/sidebar/partials/link-section.tsx +++ b/web/app/components/sidebar/partials/link-section.tsx @@ -14,7 +14,7 @@ export const LinkSection: React.FC = () => { const linkCount = me.root.personalLinks?.length || 0 return ( -
+
diff --git a/web/app/components/sidebar/partials/task-section.tsx b/web/app/components/sidebar/partials/task-section.tsx index 74be7614..81e01c7d 100644 --- a/web/app/components/sidebar/partials/task-section.tsx +++ b/web/app/components/sidebar/partials/task-section.tsx @@ -59,9 +59,13 @@ export const TaskSection: React.FC = () => { } return ( -
- +
+ {/* { iconName="History" filter="upcoming" count={upcomingTasks.length} - /> + /> */}
) } @@ -86,25 +90,24 @@ interface TaskSectionHeaderProps { const TaskSectionHeader: React.FC = ({ title, - filter, count, iconName, }) => ( - {iconName && } - -

- {title} - {count > 0 && {count}} -

+
+ {iconName && ( + + )} +

{title}

+
+ {count > 0 && {count}} ) diff --git a/web/app/components/sidebar/sidebar.tsx b/web/app/components/sidebar/sidebar.tsx index a520ddb1..b829eac4 100644 --- a/web/app/components/sidebar/sidebar.tsx +++ b/web/app/components/sidebar/sidebar.tsx @@ -129,12 +129,11 @@ const SidebarContent: React.FC = React.memo(() => {
-
+
{me._type === "Account" && } - {/* {me._type === "Account" && } */} {me._type === "Account" && } - {me._type === "Account" && } + {/* {me._type === "Account" && } */} {me._type === "Account" && }
diff --git a/web/app/routes/_layout/_pages/_protected/tasks/index.tsx b/web/app/routes/_layout/_pages/_protected/tasks/index.tsx index 1b05b1fc..2f102b72 100644 --- a/web/app/routes/_layout/_pages/_protected/tasks/index.tsx +++ b/web/app/routes/_layout/_pages/_protected/tasks/index.tsx @@ -1,4 +1,4 @@ -import { createFileRoute } from "@tanstack/react-router" +import { createFileRoute, Link } from "@tanstack/react-router" import { useAccount } from "@/lib/providers/jazz-provider" import { LaIcon } from "@/components/custom/la-icon" import { isToday, isFuture } from "date-fns" @@ -8,12 +8,59 @@ import { TaskForm } from "./-form" import { TaskList } from "./-list" import { Task } from "~/lib/schema/task" import { z } from "zod" +import { cn } from "~/lib/utils" // import { getFeatureFlag } from "~/actions" const taskSearchSchema = z.object({ filter: z.enum(["today", "upcoming"]).optional(), }) +const TaskTabs: React.FC<{ filter?: string }> = ({ filter }) => { + return ( +
+ + + All Tasks + + + + Today + + + + + Upcoming + +
+ ) +} + export const Route = createFileRoute("/_layout/_pages/_protected/tasks/")({ // beforeLoad: async ({ context }) => { // if (!context.user.id) { @@ -66,7 +113,8 @@ function TaskComponent() { return (
-
+ + {/*
-
+
*/}