-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
job api integrated #442
base: master
Are you sure you want to change the base?
job api integrated #442
Conversation
> | ||
<Link | ||
className="btn-text-color" | ||
href="https://stg-erp.prixite.com/job_application/new?job_title=test-job" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the env variable for the base url and job_title prop is not dynamic.
pages/jobs/[jobDetail].tsx
Outdated
|
||
export const getServerSideProps = async (context: JobProps) => { | ||
const name = context.params?.jobDetail | ||
const url = `https://stg-erp.prixite.com/api/resource/Job%20Opening?fields=["*"]&filters=[["Job%20Opening","name","=","${name}"]]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base url should be added from env variables.
pages/jobs/index.tsx
Outdated
|
||
export const getServerSideProps = async () => { | ||
const url = | ||
'https://stg-erp.prixite.com/api/resource/Job%20Opening?fields=[%22*%22]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again here
pages/jobs/index.tsx
Outdated
import Link from 'next/link' | ||
import Head from 'next/head' | ||
import React from 'react' | ||
import { JobProps } from '../../types/interfaces' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we add absolute urls here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constants should be coming from any constants utils file.
pages/jobs/[jobDetail].tsx
Outdated
<Box className="header"> | ||
<Box className="heading"> | ||
<Typography className="heading-text"> | ||
{result?.data[0].job_title} 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add validation ? after data[0] as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems fine
No description provided.