Last change
on this file since efaa053 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 10 months ago |
images upload/download impl, other fixes
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | import React from "react";
|
---|
2 | import Carousel from "react-bootstrap/Carousel";
|
---|
3 | import Review from "../BecomeAHost/Review";
|
---|
4 | import {useState} from "react";
|
---|
5 | import {Container} from "react-bootstrap";
|
---|
6 | import review from "../BecomeAHost/Review";
|
---|
7 |
|
---|
8 | const ReviewsCarousel = (props) => {
|
---|
9 | document.body.style.backgroundColor = "white";
|
---|
10 |
|
---|
11 | const [index, setIndex] = useState(0);
|
---|
12 |
|
---|
13 | const handleSelect = (selectedIndex) => {
|
---|
14 | setIndex(selectedIndex);
|
---|
15 | };
|
---|
16 | return (<>
|
---|
17 | <Container
|
---|
18 | className="py-3 px-1 my-4">
|
---|
19 | <Carousel className="w-100" activeIndex={index} onSelect={handleSelect} indicators={false}>
|
---|
20 | {props.reviews.length === 0 && <Carousel.Item>
|
---|
21 | <Container>
|
---|
22 | <h4>За избраниот ресурс се уште не се достапни оценки!</h4>
|
---|
23 | </Container>
|
---|
24 | </Carousel.Item>}
|
---|
25 | {props.reviews.map((rev) => {
|
---|
26 | return (
|
---|
27 | <Carousel.Item>
|
---|
28 | <Review key={review.reviewId} review={rev}></Review>
|
---|
29 | </Carousel.Item>
|
---|
30 | )
|
---|
31 | })}
|
---|
32 | </Carousel>
|
---|
33 | </Container>
|
---|
34 | </>)
|
---|
35 | }
|
---|
36 |
|
---|
37 | export default ReviewsCarousel; |
---|
Note:
See
TracBrowser
for help on using the repository browser.