Skip to content

Commit

Permalink
Added flag for jobs-create-page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil2000 committed Oct 12, 2024
1 parent 3fcf032 commit 6465e95
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
27 changes: 19 additions & 8 deletions app/(app)/jobs/create/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLInputElement>(null);
const [imgUrl, setImgUrl] = useState<string | null>(null);

if (!flagEnabled) {
notFound();
}

return (
<form className="mx-auto max-w-4xl p-3 pt-8 sm:px-4">
<Heading level={1}>Post a job</Heading>
Expand All @@ -33,13 +42,15 @@ export default function Content() {
</div>
<Field>
<div className="flex items-center space-x-4">
<Image
src="https://s3-alpha-sig.figma.com/img/8a23/cb6a/8d462a922529d9ae7a44772fb9f64b61?Expires=1729468800&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=XnJwSdtoT2ZlVsJvhBPWF3AAxyOJ5qVcunVwoDqMLar78R6wuZUJvkxS3VqeOFued9~gWF8biRwIdWhSA4NHF9Fiw5P5S-KFzs68QXDGLYVL7AhoEA2u-GYaEYep52BRmsQWceF8Bd9IDPYceJkF7MyIQCIkJFkuZ6FvXcHa319yBMk0xS4qGux2sNiBqxXOjA9gcraKuBh~mj3bEQ9l4GrqzBeHRt1s6OaBqbIJUSic984Wfizmfyjcu7NDLxJaTVsYVhe8d5p2Sv8QVCrvc0UspSGLYpsmJjybLF41zoEEkIxSb~iX905tpAo2q757TKSTDOinzLdCcUwCJ-VZ8Q__"
width={80}
height={80}
alt="Company Logo"
className="rounded-[10px]"
/>
{imgUrl && (
<Image
src={imgUrl}
width={80}
height={80}
alt="Company Logo"
className="rounded-[10px]"
/>
)}
<div>
<Button
color="dark/white"
Expand Down
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const REMOTE_PATTERNS = [
// Temporary wildcard
"*.s3.eu-west-1.amazonaws.com",
"s3.eu-west-1.amazonaws.com",
"s3-alpha-sig.figma.com", //Added for Figma
].map((hostname) => ({
hostname,
protocol: "https",
Expand Down
1 change: 1 addition & 0 deletions utils/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { posthog } from "posthog-js";

export const FEATURE_FLAGS = {
FEATURE_FLAG_TEST: "feature-flag-test",
JOB_POST_CREATE: "job-post-create",
// Add more feature flags as needed
} as const;

Expand Down

0 comments on commit 6465e95

Please sign in to comment.