diff --git a/src/redux/slices/shop-id.ts b/src/redux/slices/shop-id.ts new file mode 100644 index 0000000..6e56f77 --- /dev/null +++ b/src/redux/slices/shop-id.ts @@ -0,0 +1,26 @@ +// src/slices/token.ts +import { createSlice, PayloadAction } from "@reduxjs/toolkit"; + +// Initial type for the token state +interface ShopIdState { + shop_id: string; +} + +// Initial value for the token state +const initialState: ShopIdState = { + shop_id: "", +}; + +const shopIdSlice = createSlice({ + name: "shop-id", + initialState, + reducers: { + setShopId: (state, action: PayloadAction) => { + state.shop_id = action.payload; + }, + }, +}); + +export const { setShopId } = shopIdSlice.actions; + +export default shopIdSlice.reducer;