From 6465e9579db027ae1affea4d97b0c2aac1c4b0f5 Mon Sep 17 00:00:00 2001 From: NIL2000 Date: Sat, 12 Oct 2024 18:58:47 +0530 Subject: [PATCH] Added flag for jobs-create-page --- app/(app)/jobs/create/_client.tsx | 27 +++++++++++++++++++-------- next.config.js | 1 - utils/flags.ts | 1 + 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/(app)/jobs/create/_client.tsx b/app/(app)/jobs/create/_client.tsx index b9a2f00b..41d4be2c 100644 --- a/app/(app)/jobs/create/_client.tsx +++ b/app/(app)/jobs/create/_client.tsx @@ -17,11 +17,20 @@ import { } from "@/components/ui-components/radio"; import { Strong, Text } from "@/components/ui-components/text"; import { Textarea } from "@/components/ui-components/textarea"; +import { FEATURE_FLAGS, isFlagEnabled } from "@/utils/flags"; import Image from "next/image"; -import React, { useRef } from "react"; +import { notFound } from "next/navigation"; +import React, { useRef, useState } from "react"; export default function Content() { + const flagEnabled = isFlagEnabled(FEATURE_FLAGS.JOB_POST_CREATE); const fileInputRef = useRef(null); + const [imgUrl, setImgUrl] = useState(null); + + if (!flagEnabled) { + notFound(); + } + return (
Post a job @@ -33,13 +42,15 @@ export default function Content() {
- Company Logo + {imgUrl && ( + Company Logo + )}