------------------------------------------------------------------------------------ In this video, we build a dynamic job detail page in Next.js App Router using dynamic routes. When an applicant clicks on a job card, they are redirected to a dynamic URL where we extract the job ID from params and load job-specific data.
We cover: Dynamic folder structure [id] Link component usage How to get ID from URL Why params type behaves differently
👉 Full job card UI will be built in the next video. ------------------------------------------------------------------------------------ 🔗 Useful Playlists
⌛TIMELINE⏳ 00:00 Dynamic route for applicant job detail page 01:20 Support the channel ❤️ 01:38 What we already implemented 01:52 Try building it yourself (challenge) 02:30 Link component in Next.js 03:20 How the dynamic URL looks 03:55 Dynamic folder structure explained 04:50 Getting card ID from URL 06:30 Console logging params 07:50 Why params type is different 08:48 Premium course source code
0:00 Introduction to Dynamic Routing for Job Detail Page
1:37 Setting Up Dynamic Route with Parameters in Next.js
5:59 Finalizing the Implementation and Call to Action
Hello what's up everyone
Welcome back to the next-gen and mySQL-powered job portal application
Today is day 69
And today we should explore how to create a dynamic route for our applicant job detail page
Yeah guys what I mean is that so far we've reached this point here
This is our home now this is where we're finding jobs
everything the employer's poster shows you
Now if I don't happen to know the details
I need to upload my
resume so obviously I'll click here
to view it in detail
So today's a short video showing you that you can at
least click on this page right I'll click on it here
Just as a moment ago ID number 9 came up here
If I click ID number 8 keeps appearing
which is correct
Clicking back here will bring me back right here
So this dynamic route
and how do you know which post or
which job posting the user clicked on
The ID you'receiving
is in this
manner Because once I get this ID my job ID
So I have the job ID very easily
it's basically the job table
the job's ID and that's your ID number 9
So I have it very easily
What was the job title for job ID 9
what is the employer ID
what is the description
what is the tag
minimum and maximum salary
I'll find out for you Just give me that ID once and
from there your task begins
dynamic route parameters
this parameter of yours
will be useful So without
starting any video of yours
but before that guys
if you haven't checked out the previous video yet
please do so now
and if you haven't liked and subscribed to my
awesome channel Thapa Technical yet please do
so now
because your like and subscription will greatly motivate me to keep uploading such
videos completely free of charge
For you guys
okay
Well it's extremely simple
and we've probably already done it before
Yeah guys obviously even when the employer was posting if they
needed to view the dynamic
details page basically to edit it
So we did it
So I'd like to ask you guys
live one task
right now right away
Pause and try it
yourself whenever I
click on any card using this method
so I need the ID
of that card and I'm heading to a dynamic page
and if you're watching the gowse
and the link I have the one with the
active functionality
is also telling me this
I've just finished going through the dynamic page
but my parent page is
literally just for finding jobs
so he still appears active to me
the reason I appeared active was
We made this
video so be sure to
check it out
okay Alright
I hope you at least gave it a
try because it was extremely
simple—just look it's very
easy here's how
it works if we
Whenever you click anywhere in this card I
need that ID
in any way possible
and I'll call the main page
which will be my dynamic page
so that means
my job card
here we have this link
As I also explained in yesterday 's
video we have a link component
all my data is stored
inside it so no matter where
I click
my task will be done right
If I click anywhere else I 'll
have a link set up for
that component obviously imported
from our next-link
and here if you look closely you'll see the href
because every time someone clicks on it
So we’re bound to get redirected
somewhere aren’t we So where exactly
will we be redirected
whenever anyone clicks on this card we want to
redirect them to our dynamic
page on the dynamic crowd
and what is the ID of that dynamic page
and what will be its route
how will I find out
with the help of this code
simple
the applicant has our dashboard
Whenever we talk about the applicant
we're already inside the hyphen
dashboard because we've already routed the segment for the applicant
It's set up this way
so it won't
appear in the URL but the dashboard
is still visible
and here we have the Hyphen
Dashboard Hyphen Jobs because
up to this point you're currently seeing job cards
After that your dynamic is
and that is the job id I've passed along
it's a dynamic value
so why am I passing it now
And whichever route you're using
you'll need to create it right here
so here
we have our source
folder and this is your
job over here
and if you
look inside these jobs
so I created a dynamic
crowd somewhat like
this if you
look closely
here we have this
Look inside the square brackets
here and here too you'll see the square brackets
If you type anything inside the square brackets
it becomes dynamic for you
and I've created a page inside it
Mantab Jobs that
jobs slash
the same
idemic let's say
which is dynamic
You'll have an ID
if you go to it
like jobs/something
but mostly we'll prefer the number itself
any text entered after jobs/ will redirect
to this page this page
will be the destinatio
at's why you're
coming to this page to show
me on this
page what needs to be shown
This will be the content shown
and how did I find out on this page
which card the user clicked on in the URL
What's her ID what's
her number I'll have to figure that out here so
if I start on that page
You can see by
default next yes gives you a
params basically
handing
you a parameter a props
you can easily
determine on the URL
which dynamic route
or property it is
You can easily determine its
value using these parameters so
naturally if it's TypeScript
you'll need to specify the type
So see it's
easy—just a second—here if I
show you these params
what you'll
get here is
you will
receive a job ID and that job
ID should be
a string
and I’ve placed it inside the object you can put anything inside can't you so
make sure inside the object
job id make sure karna
at's the job ID
I wrote the job ID here
because I'm referring to
the dynamic route associated with my
the name inside the brackets
I've kept the job ID
that's why it's your
job ID the name there
should be the same here
So what are we doing here
we'retrieving the parameters
you know this trickiness
and inside it you'll get a job ID
which should be a string
now you might be thinking but that's a number
But no problem we'll deal with him later but for now we're treating him
as a string
and I kept it
inside the interface this
one and I passed it over here like this
You've already seen this
you've seen it before
it's not like it's your first time you're playing with dynamics
and calmly I dismantled him right here
took him apart
Take it easy I'm handling
one task for you your dot is
completely clear
fresh and new
just in case you've forgotten
Just to remind you
You're the one aren't you
I'll write it here from the parameters
okay then
Alright I'm heading over there
Oh my god
I've already dropped the matter I'm going there now anyway
I'll refresh
it once more
okay got 9 here what 's
available right here
let me check briefly
This is my URL ID
okay then
Alright okay by the way I'm heading
over here I'll
click on this now
Something's off with my setup route
dashboard
job ID
use params jobId
params should be awaited
before accessing its properties
it should be awaited
while working one task
the next should be awaited
Matlab async banana padega
mujhe isko
async and awaited
toh matlab await
Let's see what happens
when I refresh once
So much data is coming through oh
my god
oh okay
I guess I'm receiving the data
don't worry
we've placed a string there
But it's just one number we'll change it for you
So much data is coming in
look here in params this is
what params is
it's returning a
promise and in job id
You're already showing
me 8 look see this is how it appears
to you this way
Look here colon basically
curly braces job
id and an 8
showing up
as a
string look here
we've set its type in this manner
job id
and it's an 8-character string
That's why we've set it up this way
I hope that's now clear and
in this manner
You must have
at least eight I
see okay so if I come here
on this
It was me
9
okay
alright
8 is here
if I keep going from
here so
I need to meet 9
and that's it
look here
I'm getting 9 right here
Alright don 't worry we'
ll change
it to numbers
and all those
things so that's settled but
Today in this video I
'm
showing you exactly how it works
simple okay so hey guys this
is it
so
Hey everyone
this is it that's all
for this video today hope you enjoyed it
rest you'll see in the next one
You haven't checked out
the previous video yet so please do
the source code is
completely free yes guys it 's entirely free
and if you
haven 't subscribed to the channel yet please do
so now and give it a like
and share it
with your friends
Even the smallest
gesture from you would make me incredibly
happy next
now we'll see
with the help of this ID
how do we retrieve complete data
we'll watch the Kalki
video but today just this
much of the
video and as your task
if you wish then
You can do it even more easily
you know so
guys I' ll see
you in the next video
Until then
everyone thank
you so much take care