Create new entrypoint for sharable Wrapstodon (#37121)
This commit is contained in:
8 files changed
+132
-5
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
import {
|
||||
@@ -29,7 +30,12 @@ interface AnnualReportState {
|
||||
const annualReportSlice = createSlice({
|
||||
name: 'annualReport',
|
||||
initialState: {} as AnnualReportState,
|
||||
reducers: {},
|
||||
reducers: {
|
||||
setReport(state, action: PayloadAction<AnnualReport>) {
|
||||
state.report = action.payload;
|
||||
state.state = 'available';
|
||||
},
|
||||
},
|
||||
extraReducers(builder) {
|
||||
builder
|
||||
.addCase(fetchReportState.fulfilled, (state, action) => {
|
||||
@@ -47,6 +53,7 @@ const annualReportSlice = createSlice({
|
||||
});
|
||||
|
||||
export const annualReport = annualReportSlice.reducer;
|
||||
export const { setReport } = annualReportSlice.actions;
|
||||
|
||||
export const selectWrapstodonYear = createAppSelector(
|
||||
[(state) => state.server.getIn(['server', 'wrapstodon'])],
|
||||
|
||||
Reference in new issue
Block a user