mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
today and upcoming tasks
This commit is contained in:
15
web/components/routes/task/TodayTaskRoute.tsx
Normal file
15
web/components/routes/task/TodayTaskRoute.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { TaskRoute } from "@/components/routes/task/TaskRoute"
|
||||
import { currentUser } from "@clerk/nextjs/server"
|
||||
import { notFound } from "next/navigation"
|
||||
import { get } from "ronin"
|
||||
|
||||
export default async function TodayTasksPage() {
|
||||
const user = await currentUser()
|
||||
const flag = await get.featureFlag.with.name("TASK")
|
||||
|
||||
if (!user?.emailAddresses.some(email => flag?.emails.includes(email.emailAddress))) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
return <TaskRoute filter="today" />
|
||||
}
|
||||
Reference in New Issue
Block a user