// numberSlice.ts
import { createSlice, PayloadAction } from '@reduxjs/toolkit';

type tokenType = {
  token: string
}

const initialState: tokenType = {
  token: '',
};

const numberSlice = createSlice({
  name: 'deviceToken',
  initialState,
  reducers: {
    setDeviceToken: (state, action: PayloadAction<string>) => {
      state.token = action.payload;
    },
  },
});

export const { setDeviceToken } = numberSlice.actions;

export default numberSlice.reducer;
