move mentions state to the ConversationState
parent
23e9a6d31c
commit
b7df0788c2
@ -1,27 +0,0 @@
|
|||||||
import { createSlice } from '@reduxjs/toolkit';
|
|
||||||
|
|
||||||
export type MentionsInputState = Array<{
|
|
||||||
id: string;
|
|
||||||
authorPhoneNumber: string;
|
|
||||||
authorProfileName: string;
|
|
||||||
}>;
|
|
||||||
|
|
||||||
export const initialMentionsState: MentionsInputState = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This slice is the one holding the default joinable rooms fetched once in a while from the default opengroup v2 server.
|
|
||||||
*/
|
|
||||||
const mentionsInputSlice = createSlice({
|
|
||||||
name: 'mentionsInput',
|
|
||||||
initialState: initialMentionsState,
|
|
||||||
reducers: {
|
|
||||||
updateMentionsMembers(state, action) {
|
|
||||||
window?.log?.warn('updating mentions input members length', action.payload?.length);
|
|
||||||
return action.payload as MentionsInputState;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const { actions, reducer } = mentionsInputSlice;
|
|
||||||
export const { updateMentionsMembers } = actions;
|
|
||||||
export const defaultMentionsInputReducer = reducer;
|
|
@ -1,5 +0,0 @@
|
|||||||
import { StateType } from '../reducer';
|
|
||||||
|
|
||||||
import { MentionsInputState } from '../ducks/mentionsInput';
|
|
||||||
|
|
||||||
export const getMentionsInput = (state: StateType): MentionsInputState => state.mentionsInput;
|
|
Loading…
Reference in New Issue