Skip to content
Snippets Groups Projects
Commit c3018119 authored by Inès Yeterian's avatar Inès Yeterian
Browse files

change of approach : testing without breaking

parent b344a82a
Branches
No related tags found
1 merge request!4Url/year/title
...@@ -8,7 +8,7 @@ const date = new Date() ...@@ -8,7 +8,7 @@ const date = new Date()
const beginYear = 1900 + (date.getMonth() < 7 ? date.getYear()-1 : date.getYear()); const beginYear = 1900 + (date.getMonth() < 7 ? date.getYear()-1 : date.getYear());
function formToucanUrlId(toucan){ function formToucanUrlId(toucan){
return toucan.title.toLowerCase().replace(/\s/g, "")+"-"+toucan.date.getFullYear(); return toucan.title.toLowerCase().replace(/\s/g, "")+"-"+toucan.date.getYear();
} }
function AllToucan(props){ function AllToucan(props){
...@@ -51,9 +51,10 @@ function AllToucan(props){ ...@@ -51,9 +51,10 @@ function AllToucan(props){
/> />
<Card.Group centered > <Card.Group centered >
{toucans.map( toucan => { {toucans.map( toucan => {
console.log(formToucanUrlId(toucan))
return <ToucanCard return <ToucanCard
image={`${props.backURL}/toucan/img/${toucan["_id"]}`} image={`${props.backURL}/toucan/img/${toucan["_id"]}`}
link={`${props.backURL}/toucan/pdf/${formToucanUrlId(toucan)}+`} link={`${props.backURL}/toucan/pdf/${toucan.title}+`}
header={toucan.title} header={toucan.title}
toucanId={toucan._id} toucanId={toucan._id}
isAdmin={props.isAdmin} isAdmin={props.isAdmin}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment