Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67978282
DetailCard.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jun 25, 08:18
Size
3 KB
Mime Type
text/x-java
Expires
Thu, Jun 27, 08:18 (2 d)
Engine
blob
Format
Raw Data
Handle
18503506
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
DetailCard.js
View Options
import
React
,
{
useContext
}
from
"react"
import
{
makeStyles
}
from
'@material-ui/core/styles'
;
import
{
Container
,
Row
,
Col
}
from
'react-bootstrap'
;
import
Accordion
from
'@material-ui/core/Accordion'
;
import
AccordionSummary
from
'@material-ui/core/AccordionSummary'
;
import
AccordionDetails
from
'@material-ui/core/AccordionDetails'
;
import
Typography
from
'@material-ui/core/Typography'
;
import
ExpandMoreIcon
from
'@material-ui/icons/ExpandMore'
;
import
Card
from
'@material-ui/core/Card'
;
import
CardActions
from
'@material-ui/core/CardActions'
;
import
CardContent
from
'@material-ui/core/CardContent'
;
import
Button
from
'@material-ui/core/Button'
;
import
"./termcard.css"
import
{
FaTruckLoading
}
from
"react-icons/fa"
;
import
{
FcCheckmark
}
from
"react-icons/fa"
;
import
{
MdNotInterested
}
from
"react-icons/Md"
;
const
useStyles
=
makeStyles
((
theme
)
=>
({
card
:
{
width
:
'33%'
,
marginTop
:
"1rem"
,
},
root
:
{
flexGrow
:
1
,
},
chip
:
{
margin
:
0.5
,
},
heading
:
{
fontSize
:
theme
.
typography
.
pxToRem
(
15
),
fontWeight
:
theme
.
typography
.
fontWeightRegular
,
},
}))
function
DetailsCard
({
details
})
{
const
classes
=
useStyles
();
if
(
details
!==
'null'
)
{
// details.country.map(i =>(
// console.log(i.name)
// ))
console
.
log
(
details
.
country
)
return
(
<
div
className
=
{
classes
.
root
}
>
<
Accordion
key
=
{
details
.
id
}
>
<
AccordionSummary
expandIcon
=
{
<
ExpandMoreIcon
/>
}
aria
-
controls
=
"panel1a-content"
id
=
"panel1a-header"
>
<
Typography
className
=
{
classes
.
heading
}
>
{
details
.
name
}
{
/* {details2 ? details2.name
:null} */
}
<
/Typography>
<
/AccordionSummary>
<
AccordionDetails
>
<
Typography
>
<
Card
className
=
{
classes
.
root
}
>
<
CardContent
>
<
Typography
className
=
{
classes
.
title
}
color
=
"textSecondary"
gutterBottom
>
<
h4
>
{
details
.
name
}
<
/h4>
<
/Typography>
<
Typography
variant
=
"h5"
component
=
"h2"
>
<
/Typography>
<
Typography
className
=
{
classes
.
pos
}
color
=
"textSecondary"
>
{
details
.
country
&&
details
.
country
.
map
(
item
=>
{
return
<
div
key
=
{
item
.
id
}
>
{
item
.
name
}
<
/div>;
})}
{
details
.
oa_options
?
<
Button
href
=
{
details
.
oa_options
}
target
=
"blank"
rel
=
"noopener noreferrer"
size
=
"small"
>
Open
Access
Options
<
/Button>
:
null
}
<
/Typography>
<
Typography
variant
=
"body2"
component
=
"p"
>
{
details
.
oa_status
?
<
div
>
<
p
>
Open
Acces
Status
:
{
details
.
oa_status
.
status
}
<
/p>
<
p
>
{
details
.
oa_status
.
description
}
<
/p>
{
/* <p>subscription: {details.oa_status.subscription ? <div><FcCheckmark /></div>
: <div><MdNotInterested /></div>}</p>
<p>{details.oa_status.accepted_manuscript}</p>
<p>{details.oa_status.final_version}</p>
<p>{details.oa_status.apc}</p> */
}
<
/div>
:
null
}
{
details
.
oa_status
?
<
div
>
hello
<
/div>
:
null
}
<
/Typography>
<
/CardContent>
<
CardActions
>
<
Button
href
=
{
details
.
website
}
target
=
"blank"
rel
=
"noopener noreferrer"
size
=
"small"
>
Learn
More
<
/Button>
<
/CardActions>
<
/Card>
<
/Typography>
<
/AccordionDetails>
<
/Accordion>
<
/div>
)
}
else
{
return
null
}
}
export
default
DetailsCard
Event Timeline
Log In to Comment