* tasks

* task input

* fixed jazz things

* create new task ui

* feat: simple feature flag

---------

Co-authored-by: marshennikovaolga <marshennikova@gmail.com>
Co-authored-by: Aslam H <iupin5212@gmail.com>
This commit is contained in:
Nikita
2024-09-27 20:55:03 +03:00
committed by GitHub
parent 223a4524ab
commit 34d69be960
13 changed files with 533 additions and 142 deletions

View 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 TaskPage() {
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 />
}

View File

@@ -10,6 +10,19 @@ import { ZSAError } from "zsa"
const MAX_FILE_SIZE = 1 * 1024 * 1024
const ALLOWED_FILE_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"]
export const getFeatureFlag = authedProcedure
.input(
z.object({
name: z.string()
})
)
.handler(async ({ input }) => {
const { name } = input
const flag = await get.featureFlag.with.name(name)
return { flag }
})
export const sendFeedback = authedProcedure
.input(
z.object({