import { createSlice , PayloadAction } from "@reduxjs/toolkit";

type InterestedProductType = {
    productID: string
  }
  
  const initialState: InterestedProductType = {
    productID: '',
  };


  const interestSlice = createSlice({
   name:'interest',
   initialState,
   reducers:{
    setInterest:(state,action:PayloadAction<string>) =>{
        state.productID = action.payload
    }
   } 
  })

  export const { setInterest } = interestSlice.actions;

  export default interestSlice.reducer;