
import { createSlice } from "@reduxjs/toolkit";


interface LongState {
    // scenario: null,
    join: any,
    follow: any,
    title: string,
}

const initialState: LongState = {
    // scenario: null,
    join: null,
    follow: null,
    title: ''
}

const longSlice = createSlice({
    name: 'access',
    initialState,
    reducers: {

        setJoinData(state, action) {
            state.join = action.payload
        },
        setFollow(state, action) {
            state.follow = action.payload
        },
        setJoinTitle(state, action) {
            state.title = action.payload
        },


    }
});

export default longSlice.reducer;
export const { setJoinData, setFollow, setJoinTitle } = longSlice.actions;