Skip to content
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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

Aleesha-azhar
Copy link
Contributor

No description provided.

>
<Link
className="btn-text-color"
href="https://stg-erp.prixite.com/job_application/new?job_title=test-job"
Copy link
Contributor

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.


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}"]]`
Copy link
Contributor

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.


export const getServerSideProps = async () => {
const url =
'https://stg-erp.prixite.com/api/resource/Job%20Opening?fields=[%22*%22]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again here

import Link from 'next/link'
import Head from 'next/head'
import React from 'react'
import { JobProps } from '../../types/interfaces'
Copy link
Contributor

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?

Copy link
Contributor

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.

<Box className="header">
<Box className="heading">
<Typography className="heading-text">
{result?.data[0].job_title} 🚀
Copy link
Contributor

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

Copy link
Contributor

@umairjameelprixite umairjameelprixite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants