import React from "react";

export default function loginReducer(prevState, action) {
  switch (action.type) {
    case "SIGN_IN":
      return {
        ...prevState,
        isSignin: true,
        userToken: action.token,
      };
    case "SIGN_OUT":
      return {
        ...prevState,
        isSignin: false,
        userToken: null,
      };
  }
}
