Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
embl.org
html-sites
embl-jobs-pages
Commits
375ef811
Commit
375ef811
authored
May 19, 2022
by
Nitin Jadhav
Browse files
Merge branch 'jobs-email-links-fix' into 'master'
Jobs email links fix See merge request
!90
parents
405175ea
5ee4d68a
Pipeline
#280456
passed with stages
in 4 minutes and 35 seconds
Changes
2
Pipelines
61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/app/App.jsx
src/app/App.jsx
+1
-3
src/components/alerts/EmailAlertRedirects.jsx
src/components/alerts/EmailAlertRedirects.jsx
+4
-2
No files found.
src/app/App.jsx
View file @
375ef811
...
...
@@ -40,9 +40,7 @@ export function App() {
<
Route
path
=
"/alerts/alert-email/:jobRef"
render
=
{
({
match
})
=>
(
<
EmailAlertRedirects
jobId
=
{
match
.
params
.
jobRef
}
/>
)
}
element
=
{
<
EmailAlertRedirects
/>
}
/>
<
Route
path
=
"/alerts"
element
=
{
<
Alerts
/>
}
/>
...
...
src/components/alerts/EmailAlertRedirects.jsx
View file @
375ef811
...
...
@@ -3,14 +3,16 @@ import { Navigate } from "react-router-dom";
import
{
useFetchJobsList
}
from
"
../../services/useFetchJobsList
"
;
import
{
VFLoaderBox
}
from
"
component-templates/VFLoader/VFLoader
"
;
import
{
JobNotFound
}
from
"
components/job-details/JobDetails
"
;
import
{
useParams
}
from
"
react-router
"
;
/* Raison d'être of this component is to Navigate users that come from email alerts to actual job page */
export
default
function
EmailAlertNavigates
({
jobId
})
{
export
default
function
EmailAlertNavigates
()
{
const
{
jobRef
}
=
useParams
();
const
{
filteredJobs
,
loading
,
error
}
=
useFetchJobsList
();
const
[
job
,
setJob
]
=
useState
();
useEffect
(()
=>
{
if
(
filteredJobs
&&
filteredJobs
.
length
)
{
const
foundJob
=
filteredJobs
.
find
((
job
)
=>
job
.
id
===
job
Id
);
const
foundJob
=
filteredJobs
.
find
((
job
)
=>
job
.
id
===
job
Ref
);
setJob
(
foundJob
);
}
},
[
filteredJobs
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment