@ -27,7 +27,6 @@ import { useToasts } from 'react-toast-notifications';
import RequestModal from '../../RequestModal' ;
import RequestModal from '../../RequestModal' ;
const messages = defineMessages ( {
const messages = defineMessages ( {
requestedby : 'Requested by {username}' ,
seasons : 'Seasons' ,
seasons : 'Seasons' ,
notavailable : 'N/A' ,
notavailable : 'N/A' ,
failedretry : 'Something went wrong while retrying the request.' ,
failedretry : 'Something went wrong while retrying the request.' ,
@ -163,10 +162,15 @@ const RequestItem: React.FC<RequestItemProps> = ({
{ isMovie ( title ) ? title.title : title.name }
{ isMovie ( title ) ? title.title : title.name }
< / a >
< / a >
< / Link >
< / Link >
< div className = "text-sm" >
< div className = "flex items-center" >
{ intl . formatMessage ( messages . requestedby , {
< img
username : requestData.requestedBy.displayName ,
src = { requestData . requestedBy . avatar }
} ) }
alt = ""
className = "w-5 mr-2 rounded-full"
/ >
< span className = "text-sm" >
{ requestData . requestedBy . displayName }
< / span >
< / div >
< / div >
{ requestData . seasons . length > 0 && (
{ requestData . seasons . length > 0 && (
< div className = "items-center hidden mt-2 text-sm sm:flex" >
< div className = "items-center hidden mt-2 text-sm sm:flex" >
@ -216,9 +220,14 @@ const RequestItem: React.FC<RequestItemProps> = ({
< div className = "flex flex-col" >
< div className = "flex flex-col" >
{ requestData . modifiedBy ? (
{ requestData . modifiedBy ? (
< span className = "text-sm text-gray-300" >
< span className = "text-sm text-gray-300" >
< span className = "mr-1" > { requestData . modifiedBy . displayName } < / span >
< div className = "flex items-center" >
< span >
< img
(
src = { requestData . modifiedBy . avatar }
alt = ""
className = "w-5 mr-2 rounded-full"
/ >
< span className = "text-sm" >
{ requestData . modifiedBy . displayName } (
< FormattedRelativeTime
< FormattedRelativeTime
value = { Math . floor (
value = { Math . floor (
( new Date ( requestData . updatedAt ) . getTime ( ) - Date . now ( ) ) /
( new Date ( requestData . updatedAt ) . getTime ( ) - Date . now ( ) ) /
@ -228,6 +237,7 @@ const RequestItem: React.FC<RequestItemProps> = ({
/ >
/ >
)
)
< / span >
< / span >
< / div >
< / span >
< / span >
) : (
) : (
< span className = "text-sm text-gray-300" > N / A < / span >
< span className = "text-sm text-gray-300" > N / A < / span >