Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91561713
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, Nov 12, 05:51
Size
2 KB
Mime Type
text/x-java
Expires
Thu, Nov 14, 05:51 (1 d, 4 h)
Engine
blob
Format
Raw Data
Handle
22283538
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
"./detailscard.css"
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
{
HiLink
}
from
"react-icons/hi"
;
const
useStyles
=
makeStyles
((
theme
)
=>
({
root
:
{
'& > *'
:
{
margin
:
theme
.
spacing
(
1
),
display
:
'grid'
,
},
flexGrow
:
1
,
},
formControl
:
{
margin
:
theme
.
spacing
(
1
),
width
:
200
,
},
selectEmpty
:
{
marginTop
:
theme
.
spacing
(
2
),
},
chip
:
{
margin
:
0.5
,
},
heading
:
{
fontSize
:
theme
.
typography
.
pxToRem
(
15
),
fontWeight
:
theme
.
typography
.
fontWeightRegular
,
},
}));
function
DetailsCard
({
details
},
{
details2
})
{
const
classes
=
useStyles
();
if
(
details
!==
'null'
)
{
return
(
<
div
>
<
Card
className
=
"detail-Card"
>
<
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>;
})}
<
/Typography>
<
Typography
variant
=
"body2"
component
=
"p"
>
{
details
.
oa_status
?
<
div
>
{
details
.
oa_status
.
status
!==
"UNKNOWN"
?
<
div
>
<
p
>
Open
Acces
Status
:
{
details
.
oa_status
.
status
}
<
/p>
<
p
>
{
details
.
oa_status
.
description
}
<
/p>
<
/div>
:
null
}
<
/div>
:
null
}
{
details
.
publisher
&&
details
.
publisher
.
map
(
item
=>
{
return
<
div
key
=
{
item
.
id
}
>
Publisher
:
{
item
.
name
}
<
/div>;
})}
<
/Typography>
<
/CardContent>
<
CardActions
>
{
details
.
website
?
<
Button
href
=
{
details
.
website
}
target
=
"blank"
rel
=
"noopener noreferrer"
size
=
"small"
><
HiLink
/>
Website
<
/Button>
:
null
}
{
details
.
oa_options
?
<
Button
href
=
{
details
.
oa_options
}
target
=
"blank"
rel
=
"noopener noreferrer"
size
=
"small"
><
HiLink
/>
Open
Access
Infos
<
/Button>
:
null
}
<
/CardActions>
<
/Card>
{
/* </Typography> */
}
{
/* </AccordionDetails>
</Accordion> */
}
<
/div>
)
}
else
if
(
details
!==
'null'
&&
details2
!==
'null'
)
{
return
(
<
div
>
{
details2
.
name
}
<
/div>)
}
else
{
return
null
}
}
export
default
DetailsCard
Event Timeline
Log In to Comment