Create new entrypoint for sharable Wrapstodon (#37121)

This commit is contained in:
Echo authored and GitHub committed 2025-12-04 15:48:10 +00:00
1 parent 75b9e9a8b0
commit 0dac31dfd5
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'])],