UNPKG

@yext/search-headless

Version:

A library for powering UI components for Yext Search integrations

24 lines 623 B
import { createSlice } from '@reduxjs/toolkit'; const initialState = { enabled: true }; const reducers = { setEnabled: (state, action) => { state.enabled = action.payload; }, setSessionId: (state, action) => { state.sessionId = action.payload; }, }; /** * Registers with Redux the slice of {@link State} pertaining to session tracking of * a Search experience. */ export default function createSessionTrackingSlice(prefix) { return createSlice({ name: prefix + 'sessionTracking', initialState, reducers }); } //# sourceMappingURL=sessiontracking.js.map