31 lines
664 B
JavaScript
31 lines
664 B
JavaScript
import React from "react";
|
||
import Link from "next/link";
|
||
|
||
import NotificationMessage from "../../Events/NotificationMessage";
|
||
|
||
export default class NotificationsList extends React.Component
|
||
{
|
||
constructor(props)
|
||
{
|
||
super(props);
|
||
this.state = {
|
||
};
|
||
}
|
||
|
||
render()
|
||
{
|
||
const { events } = this.props;
|
||
console.log("NotificationsList", "events", events);
|
||
|
||
return (
|
||
<>
|
||
<ul className="list">
|
||
{ events !== undefined && events !== null && events.slice(0, 5).map((event, index) => <NotificationMessage event={ event } key={ index }/>) }
|
||
</ul>
|
||
<Link href="/events">
|
||
<a className="all">Все события</a>
|
||
</Link>
|
||
</>
|
||
)
|
||
}
|
||
} |