Skip to content

Commit

Permalink
chore: minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushiee committed Sep 24, 2021
1 parent df80eca commit 674dd9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions context/ModalContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { createContext, useState } from 'react';
import { Media } from '../types';

interface Modal {
data: Media;
modalData: Media;
setModalData: (item: Media) => void;
isModal: boolean;
setIsModal: (isModal: boolean) => void;
Expand All @@ -15,8 +15,8 @@ interface ModalProviderProps {
export const ModalContext = createContext<Modal>({} as Modal);

export function ModalProvider({ children }: ModalProviderProps) {
const [data, setModalData] = useState<Media>({} as Media);
const [modalData, setModalData] = useState<Media>({} as Media);
const [isModal, setIsModal] = useState<boolean>(false);

return <ModalContext.Provider value={{ data, setModalData, isModal, setIsModal }}>{children}</ModalContext.Provider>;
return <ModalContext.Provider value={{ modalData, setModalData, isModal, setIsModal }}>{children}</ModalContext.Provider>;
}

0 comments on commit 674dd9d

Please sign in to comment.