makes the api key modal work

This commit is contained in:
ajaythapliyal
2023-02-18 00:25:21 +05:30
parent 1b6a58520c
commit 350ccad077
5 changed files with 82 additions and 43 deletions

View File

@@ -1,4 +1,9 @@
import { configureStore, createSlice, PayloadAction } from '@reduxjs/toolkit';
import {
configureStore,
createSelector,
createSlice,
PayloadAction,
} from '@reduxjs/toolkit';
interface State {
isApiKeyModalOpen: boolean;
@@ -38,5 +43,6 @@ type RootState = ReturnType<typeof store.getState>;
export const selectIsApiKeyModalOpen = (state: RootState) =>
state.app.isApiKeyModalOpen;
export const selectApiKey = (state: RootState) => state.app.apiKey;
export const selectApiKeyStatus = (state: RootState) => !!state.app.apiKey;
export default store;