simplify star prompt translations and state

This commit is contained in:
mohadeseh safari committed 2025-03-10 14:23:09 -04:00
1 parent c185979479
commit 0f2832b728
4 files changed
+14 -15

No files matched your search

+4 -9
View File
@@ -24,9 +24,7 @@ const initialState = {
timezone: "America/Toronto",
distributedUptimeEnabled: false,
language: "gb",
starPrompt: {
closed: false
},
starPromptOpen: true,
};
const uiSlice = createSlice({
@@ -58,11 +56,8 @@ const uiSlice = createSlice({
setLanguage(state, action) {
state.language = action.payload;
},
setStarPromptClosed(state, action) {
if (!state.starPrompt) {
state.starPrompt = {};
}
state.starPrompt.closed = action.payload;
setStarPromptOpen: (state, action) => {
state.starPromptOpen = action.payload;
},
},
});
@@ -76,5 +71,5 @@ export const {
setTimezone,
setDistributedUptimeEnabled,
setLanguage,
setStarPromptClosed,
setStarPromptOpen,
} = uiSlice.actions;