diff --git a/.env.example b/.env.example
index 4852d63e..8f258297 100644
--- a/.env.example
+++ b/.env.example
@@ -17,4 +17,5 @@ CDN_BASE_ACCESS_URL=https://job-board.b-cdn.net/assets
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=
-
+# To run the application in production environment / check the envs
+# SKIP_ENV_CHECK=true npm run [replace with your script name]
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 11abf2dd..0c282459 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,10 +1,13 @@
name: Continuous Integration
+env:
+ SKIP_ENV_CHECK: 'true'
+
on:
push:
- branches: [ main ]
+ branches: [main]
pull_request:
- branches: [ main ]
+ branches: [main]
jobs:
build:
@@ -14,6 +17,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
+
- name: Use Node.js
uses: actions/setup-node@v2
with:
diff --git a/README.md b/README.md
index c4248a98..a13d9175 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
# Project Name: Job Board
+
[All about job board](https://marmalade-height-05f.notion.site/100xDevs-Job-board-ab8ca399180d49e4bc0c2ff5c81dfb08?pvs=25)
[Project Status](https://marmalade-height-05f.notion.site/Job-board-10315651c69c80b581b5f7b64667341c)
+
## Table of Contents
- [Description](#description)
@@ -37,12 +39,12 @@ Follow these steps to set up the repository locally and run it.
```bash
#
- # Database
+ # Database
#
DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
#
- # AUTH
+ # AUTH
#
NEXTAUTH_SECRET=
NEXTAUTH_URL="http://localhost:3000"
@@ -69,7 +71,6 @@ Follow these steps to set up the repository locally and run it.
[Run in browser](https://www.cryptool.org/en/cto/openssl/)
-
### Running the Project with Docker
```bash
@@ -105,45 +106,46 @@ Emails: 'user@gmail.com, admin@gmail.com';
Password: '123456';
```
-
## Steps to create a BunnyCDN storage for this repo:
1. **Create a storage zone:**
-
+
2. **Connect the storage zone to a pull zone:**
-
+
-4. **Set environment variables:**
+3. **Set environment variables:**
Go to the FTP & API Access section in the storage zone and add the following environment variables:
```bash
CDN_API_KEY=
```
-
+
Which you can find in the storage -> [storage name] -> FTP & API Access section
-
+
---
- ```bash
- CDN_BASE_UPLOAD_URL=
- ```
- Which is https://[your-hostname]/[storage-name]/[any folder name you might have added otherwise empty]
-
+```bash
+CDN_BASE_UPLOAD_URL=
+```
+
+Which is https://[your-hostname]/[storage-name]/[any folder name you might have added otherwise empty]
+
---
-
- ```bash
- CDN_BASE_ACCESS_URL=
- ```
- Which is https://[your-pull-zone-hostname]/[any folder name you might have added otherwise empty] or get link from the dashboard as mentioned below
-
+
+```bash
+CDN_BASE_ACCESS_URL=
+```
+
+Which is https://[your-pull-zone-hostname]/[any folder name you might have added otherwise empty] or get link from the dashboard as mentioned below
+
diff --git a/next.config.js b/next.config.js
index 5093fc1e..3f0b294c 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,11 +1,11 @@
-import { fileURLToPath } from "node:url";
-import createJiti from "jiti";
+import { fileURLToPath } from 'node:url';
+import createJiti from 'jiti';
-const jiti = createJiti(fileURLToPath(import.meta.url));
-
-// Import env here to validate during build. Using jiti we can import .ts files :)
-jiti("./src/env/client");
-jiti("./src/env/server");
+if (process.env.SKIP_ENV_CHECK !== 'true') {
+ const jiti = createJiti(fileURLToPath(import.meta.url));
+ jiti('./src/env/client');
+ jiti('./src/env/server');
+}
/** @type {import('next').NextConfig} */
const nextConfig = {
@@ -18,11 +18,11 @@ const nextConfig = {
images: {
remotePatterns: [
{
- protocol: "https",
- hostname: "job-board.b-cdn.net", // Change this to your CDN domain
+ protocol: 'https',
+ hostname: 'job-board.b-cdn.net', // Change this to your CDN domain
},
],
},
};
-export default nextConfig; // ES module export
\ No newline at end of file
+export default nextConfig; // ES module export
diff --git a/src/components/DescriptionEditor.tsx b/src/components/DescriptionEditor.tsx
index 51399be8..47d279c9 100644
--- a/src/components/DescriptionEditor.tsx
+++ b/src/components/DescriptionEditor.tsx
@@ -53,7 +53,7 @@ const DescriptionEditor: React.FC = ({
modules={modules}
formats={formats}
value={description}
- style={{ width: "100%" }}
+ style={{ width: '100%' }}
onChange={handleChange}
placeholder={placeholder}
className="text-white bg-gray-800 overflow-hidden job-description-editor"
diff --git a/src/components/gmaps-autosuggest.tsx b/src/components/gmaps-autosuggest.tsx
index d6e6b76e..25e1e759 100644
--- a/src/components/gmaps-autosuggest.tsx
+++ b/src/components/gmaps-autosuggest.tsx
@@ -4,7 +4,7 @@ import { clientEnv } from '@/env/client';
export type TgmapsAddress = { city: string; fullAddress: string };
-export function GmapsAutocompleteAddress({ form }: { form: any }) {
+export default function GmapsAutocompleteAddress({ form }: { form: any }) {
let autocomplete: any = null;
function onPlaceChanged() {
diff --git a/src/components/job-form.tsx b/src/components/job-form.tsx
index ac217430..7e152626 100644
--- a/src/components/job-form.tsx
+++ b/src/components/job-form.tsx
@@ -31,7 +31,14 @@ import Image from 'next/image';
import { FaFileUpload } from 'react-icons/fa';
import { Switch } from './ui/switch';
import { Label } from './ui/label';
-import { GmapsAutocompleteAddress } from './gmaps-autosuggest';
+import dynamic from 'next/dynamic';
+
+const DynamicLineDrawingAnimation = dynamic(
+ () => import('./gmaps-autosuggest'),
+ {
+ ssr: false,
+ }
+);
const PostJobForm = () => {
const { toast } = useToast();
@@ -345,7 +352,9 @@ const PostJobForm = () => {
)}
-
+
{children}
-
));
diff --git a/src/lib/constant/app.constant.ts b/src/lib/constant/app.constant.ts
index d7addb17..5c16e51f 100644
--- a/src/lib/constant/app.constant.ts
+++ b/src/lib/constant/app.constant.ts
@@ -35,7 +35,6 @@ export const adminNavbar = [
},
{ id: 2, label: 'Manage Recruiters', path: '/' },
{ id: 3, label: 'Payment History', path: '/' },
-
];
export const socials: {
@@ -64,7 +63,6 @@ export const footerItems = [
},
];
-
export const trustedCompanies = [
{
icon: adobe,
@@ -91,4 +89,3 @@ export const trustedCompanies = [
name: 'google',
},
];
-