You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
845 B
TypeScript
26 lines
845 B
TypeScript
3 months ago
|
import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
|
||
|
|
||
|
export const LEGACY_GROUP_DEPRECATED_TIMESTAMP_MS = Date.now() + 10 * 1000;
|
||
|
|
||
|
export interface ReleasedFeaturesState {
|
||
|
legacyGroupDeprecationTimestampRefreshAtMs: number;
|
||
|
}
|
||
|
|
||
|
export const initialReleasedFeaturesState = {
|
||
|
legacyGroupDeprecationTimestampRefreshAtMs: Date.now(),
|
||
|
};
|
||
|
|
||
|
const releasedFeaturesSlice = createSlice({
|
||
|
name: 'releasedFeatures',
|
||
|
initialState: initialReleasedFeaturesState,
|
||
|
reducers: {
|
||
|
updateLegacyGroupDeprecationTimestampUpdatedAt: (state, action: PayloadAction<number>) => {
|
||
|
state.legacyGroupDeprecationTimestampRefreshAtMs = action.payload;
|
||
|
},
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const { actions, reducer } = releasedFeaturesSlice;
|
||
|
export const { updateLegacyGroupDeprecationTimestampUpdatedAt } = actions;
|
||
|
export const releasedFeaturesReducer = reducer;
|