// src/store/fcmSlice.js
import { createSlice } from '@reduxjs/toolkit';

const fcmSlice = createSlice({
  name: 'fcm',
  initialState: {
    token: null
  },
  reducers: {
    setFcmToken(state, action) {
      state.token = action.payload;
    },
    clearFcmToken(state) {
      state.token = null;
    }
  }
});

export const { setFcmToken, clearFcmToken } = fcmSlice.actions;
export default fcmSlice.reducer;
