Skip to content

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.

2 participants