feat: integrate database operations for movie management in global store and UI components; enhance MovieCast with dynamic cast display and button for full cast visibility
This commit is contained in:
@@ -10,8 +10,6 @@ import {
|
||||
} from "react-icons/fa";
|
||||
import { RiCalendarCheckLine, RiCalendarScheduleLine } from "react-icons/ri";
|
||||
import { useGlobalStore } from "@/app/store/globalStore";
|
||||
import { addMovie, deleteMovie } from "@/lib/db";
|
||||
import { ReadMore } from "@/components/atoms/ReadMore";
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/atoms/Button";
|
||||
|
||||
@@ -95,12 +93,10 @@ export const Hero: FC<Props> = ({
|
||||
}, [autoRotate, rotateInterval, nextSlide, movies.length]);
|
||||
|
||||
const handleAdd = async () => {
|
||||
await addMovie(currentMovie);
|
||||
addMovieToStore(currentMovie);
|
||||
};
|
||||
|
||||
const handleRemove = async () => {
|
||||
await deleteMovie(id);
|
||||
deleteMovieInStore(id);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user