Last active
June 4, 2021 05:30
-
-
Save xiongemi/efb18cd3b8ecd8ca8552f8560f6d86b0 to your computer and use it in GitHub Desktop.
aztro daily horoscope horoscpe state with only zodiac sign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| AdhZodiacSignItem, | |
| } from '@aztro-daily-horoscope/models'; | |
| export interface HoroscopeState { | |
| zodiacSignItem?: AdhZodiacSignItem; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AdhZodiacSignItem } from '@aztro-daily-horoscope/models'; | |
| import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | |
| import { HoroscopeState } from './horoscope-state.interface'; | |
| export const horoscopeSlice = createSlice({ | |
| name: 'horoscope', | |
| initialState: {}, | |
| reducers: { | |
| setUserZodiacSignItem( | |
| state: HoroscopeState, | |
| action: PayloadAction<AdhZodiacSignItem> | |
| ) { | |
| state.zodiacSignItem = action.payload; | |
| }, | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment