public async Task <IActionResult> RateCocktail(string Id, int?currPage)
        {
            try
            {
                var cocktailDto = await _cocktailServices.FindCocktailById(Id);

                var reviewVm = cocktailDto.MapToCocktailReviewViewModel();
                reviewVm.Ingredients = cocktailDto.Ingredients.Select(i => i.MapToCocktailComponentVM()).ToList();
                string userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
                currPage = currPage ?? 1;

                var twoDtoReviews = await _reviewServices
                                    .GetTwoReviewsAsync(cocktailDto.Id, (int)currPage);

                var canUserReview = await _reviewServices.CheckIfUserCanReview(userId, cocktailDto);

                var cocktailReviewsVm = twoDtoReviews.Select(r => r.MapToViewModel()).ToList();

                reviewVm.CanReview = !canUserReview;
                //reviewVm.Reviews = cocktailReviewsVm;

                var totalPages = await _reviewServices
                                 .GetPageCountForCocktailReviewsAsync(2, cocktailDto.Id);

                var litingReviewViewModel = new ListReviewViewModel()
                {
                    Id          = reviewVm.Id,
                    Rating      = (double)Math.Round((decimal)(reviewVm.Rating ?? 0), 2),
                    Name        = reviewVm.Name,
                    Description = reviewVm.Description,
                    Ingredients = reviewVm.Ingredients.ToList(),
                    Image       = reviewVm.Image,
                    CanReview   = !canUserReview,
                    ReviewsPerPageForCocktail = cocktailReviewsVm,
                    CurrPage   = (int)currPage,
                    TotalPages = totalPages,
                    MoreToLoad = true,
                    TotalReviewsForCocktail = await _reviewServices
                                              .GetTotalReviewsCountForCocktailAsync(cocktailDto.Id)
                };

                if (twoDtoReviews.Count() == 0 && litingReviewViewModel.TotalReviewsForCocktail != 0)
                {
                    _toast.AddInfoToastMessage("There are no more reviews for this cocktail!");
                    litingReviewViewModel.MoreToLoad = false;
                }
                if (currPage == 1)
                {
                    return(View(litingReviewViewModel));
                }

                return(PartialView("_LoadMoreReviewsPartial", litingReviewViewModel));
            }
            catch (Exception ex)
            {
                _toast.AddErrorToastMessage(ex.Message);
                ViewBag.ErrorTitle = "";
                return(View("Error"));
            }
        }
        public async Task <IActionResult> Details(string Id)
        {
            try
            {
                var cocktail = await _cocktailServices.FindCocktailById(Id);

                var vm = cocktail.MapToCocktailViewModel();
                if (vm == null)
                {
                    _toast.AddErrorToastMessage($"You are tring to see Details of a cocktail with invalid model state");
                    return(StatusCode(404));
                }
                return(View(vm));
            }
            catch (Exception ex)
            {
                _toast.AddErrorToastMessage(ex.Message);
                ViewBag.ErrorTitle = "";
                return(View("Error"));
            }
        }