upd: lembaga desa
Deskripsi: - list data lembaga desa - tambah data lembaga desa - edit data lembaga desa - pencarian data lembaga desa - delete data lembaga desa No Issues
This commit is contained in:
@@ -6,19 +6,55 @@ import { InputForm } from "@/components/inputForm";
|
|||||||
import MenuItemRow from "@/components/menuItemRow";
|
import MenuItemRow from "@/components/menuItemRow";
|
||||||
import { Headers } from "@/constants/Headers";
|
import { Headers } from "@/constants/Headers";
|
||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
|
import { apiCreateGroup } from "@/lib/api";
|
||||||
|
import { setUpdateGroup } from "@/lib/groupSlice";
|
||||||
|
import { useAuthSession } from "@/providers/AuthProvider";
|
||||||
import AntDesign from "@expo/vector-icons/AntDesign";
|
import AntDesign from "@expo/vector-icons/AntDesign";
|
||||||
import { router, Stack } from "expo-router";
|
import { router, Stack } from "expo-router";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { ToastAndroid, View } from "react-native";
|
import { ToastAndroid, View } from "react-native";
|
||||||
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
const update = useSelector((state: any) => state.groupUpdate)
|
||||||
|
const { token, decryptToken } = useAuthSession()
|
||||||
const [isVisible, setVisible] = useState(false)
|
const [isVisible, setVisible] = useState(false)
|
||||||
const [isVisibleTambah, setVisibleTambah] = useState(false)
|
const [isVisibleTambah, setVisibleTambah] = useState(false)
|
||||||
|
const [title, setTitle] = useState('')
|
||||||
|
const [error, setError] = useState({
|
||||||
|
title: false,
|
||||||
|
});
|
||||||
|
|
||||||
function handleTambah() {
|
async function handleTambah() {
|
||||||
setVisibleTambah(false)
|
try {
|
||||||
setVisible(false)
|
const hasil = await decryptToken(String(token?.current))
|
||||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
const response = await apiCreateGroup({ user: hasil, name: title })
|
||||||
|
dispatch(setUpdateGroup(!update))
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
setVisibleTambah(false)
|
||||||
|
setVisible(false)
|
||||||
|
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCheck() {
|
||||||
|
if (Object.values(error).some((v) => v == true))
|
||||||
|
return false
|
||||||
|
handleTambah()
|
||||||
|
}
|
||||||
|
|
||||||
|
function validationForm(val: any, cat: 'title') {
|
||||||
|
if (cat === 'title') {
|
||||||
|
setTitle(val)
|
||||||
|
if (val == "" || val.length < 3) {
|
||||||
|
setError({ ...error, title: true })
|
||||||
|
} else {
|
||||||
|
setError({ ...error, title: false })
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -51,13 +87,20 @@ export default function RootLayout() {
|
|||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
<DrawerBottom animation="none" isVisible={isVisibleTambah} setVisible={setVisibleTambah} title="Tambah Lembaga Desa">
|
<DrawerBottom animation="none" height={30} isVisible={isVisibleTambah} setVisible={setVisibleTambah} title="Tambah Lembaga Desa">
|
||||||
<View style={{ justifyContent: 'space-between', flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<View>
|
||||||
<InputForm type="default" placeholder="Nama Lembaga Desa" required label="Lembaga Desa" />
|
<InputForm
|
||||||
|
type="default"
|
||||||
|
placeholder="Nama Lembaga Desa"
|
||||||
|
required label="Lembaga Desa"
|
||||||
|
error={error.title}
|
||||||
|
errorText="Lembaga Desa tidak boleh kosong & minimal 3 karakter"
|
||||||
|
onChange={(val) => { validationForm(val, 'title') }}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<ButtonForm text="SIMPAN" onPress={() => { handleTambah() }} />
|
<ButtonForm text="SIMPAN" onPress={() => { onCheck() }} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|||||||
@@ -8,22 +8,79 @@ import InputSearch from "@/components/inputSearch";
|
|||||||
import MenuItemRow from "@/components/menuItemRow";
|
import MenuItemRow from "@/components/menuItemRow";
|
||||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
|
import { apiDeleteGroup, apiEditGroup, apiGetGroup } from "@/lib/api";
|
||||||
|
import { setUpdateGroup } from "@/lib/groupSlice";
|
||||||
|
import { useAuthSession } from "@/providers/AuthProvider";
|
||||||
import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons";
|
import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||||
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
isActive: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export default function Index() {
|
export default function Index() {
|
||||||
|
const { token, decryptToken } = useAuthSession()
|
||||||
const { active } = useLocalSearchParams<{ active?: string }>()
|
const { active } = useLocalSearchParams<{ active?: string }>()
|
||||||
const [isModal, setModal] = useState(false)
|
const [isModal, setModal] = useState(false)
|
||||||
const [isVisibleEdit, setVisibleEdit] = useState(false)
|
const [isVisibleEdit, setVisibleEdit] = useState(false)
|
||||||
|
const [data, setData] = useState<Props[]>([])
|
||||||
|
const [search, setSearch] = useState('')
|
||||||
|
|
||||||
|
const [idChoose, setIdChoose] = useState('')
|
||||||
|
const [activeChoose, setActiveChoose] = useState(true)
|
||||||
|
const [titleChoose, setTitleChoose] = useState('')
|
||||||
|
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
const update = useSelector((state: any) => state.groupUpdate)
|
||||||
|
|
||||||
|
|
||||||
|
async function handleEdit() {
|
||||||
|
try {
|
||||||
|
const hasil = await decryptToken(String(token?.current))
|
||||||
|
const response = await apiEditGroup({ user: hasil, name: titleChoose }, idChoose)
|
||||||
|
dispatch(setUpdateGroup(!update))
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
setVisibleEdit(false)
|
||||||
|
setModal(false)
|
||||||
|
ToastAndroid.show('Berhasil mengupdate data', ToastAndroid.SHORT)
|
||||||
|
}
|
||||||
|
|
||||||
function handleEdit() {
|
|
||||||
setVisibleEdit(false)
|
|
||||||
setModal(false)
|
|
||||||
ToastAndroid.show('Berhasil mengupdate data', ToastAndroid.SHORT)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleDelete() {
|
||||||
|
try {
|
||||||
|
const hasil = await decryptToken(String(token?.current))
|
||||||
|
const response = await apiDeleteGroup({ user: hasil, isActive: activeChoose }, idChoose)
|
||||||
|
dispatch(setUpdateGroup(!update))
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
setModal(false)
|
||||||
|
ToastAndroid.show('Berhasil mengupdate data', ToastAndroid.SHORT)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleLoad() {
|
||||||
|
try {
|
||||||
|
const hasil = await decryptToken(String(token?.current))
|
||||||
|
const response = await apiGetGroup({ user: hasil, active: String(active), search: search })
|
||||||
|
setData(response.data)
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
handleLoad()
|
||||||
|
}, [active, search, update])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView>
|
<SafeAreaView>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
@@ -44,90 +101,65 @@ export default function Index() {
|
|||||||
icon={<AntDesign name="closecircleo" color={active == "false" ? 'white' : 'black'} size={20} />}
|
icon={<AntDesign name="closecircleo" color={active == "false" ? 'white' : 'black'} size={20} />}
|
||||||
n={2} />
|
n={2} />
|
||||||
</View>
|
</View>
|
||||||
<InputSearch />
|
<InputSearch onChange={setSearch} />
|
||||||
<View>
|
<View>
|
||||||
<BorderBottomItem
|
{
|
||||||
onPress={() => { setModal(true) }}
|
data.length > 0 ?
|
||||||
borderType="all"
|
data.map((item, index) => {
|
||||||
icon={
|
return (
|
||||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
<BorderBottomItem
|
||||||
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
key={index}
|
||||||
</View>
|
onPress={() => {
|
||||||
}
|
setIdChoose(item.id)
|
||||||
title="Adat"
|
setActiveChoose(item.isActive)
|
||||||
/>
|
setTitleChoose(item.name)
|
||||||
<BorderBottomItem
|
setModal(true)
|
||||||
onPress={() => { setModal(true) }}
|
}}
|
||||||
borderType="all"
|
borderType="all"
|
||||||
icon={
|
icon={
|
||||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
||||||
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
title="Dinas"
|
title={item.name}
|
||||||
/>
|
/>
|
||||||
<BorderBottomItem
|
)
|
||||||
onPress={() => { setModal(true) }}
|
})
|
||||||
borderType="all"
|
:
|
||||||
icon={
|
<Text style={[Styles.textDefault, Styles.cGray, { textAlign: 'center' }]}>Tidak ada data</Text>
|
||||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
}
|
||||||
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
title="PKK"
|
|
||||||
/>
|
|
||||||
<BorderBottomItem
|
|
||||||
onPress={() => { setModal(true) }}
|
|
||||||
borderType="all"
|
|
||||||
icon={
|
|
||||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
|
||||||
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
title="Karang Taruna"
|
|
||||||
/>
|
|
||||||
<BorderBottomItem
|
|
||||||
onPress={() => { setModal(true) }}
|
|
||||||
borderType="all"
|
|
||||||
icon={
|
|
||||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
|
||||||
<MaterialCommunityIcons name="office-building-outline" size={25} color={'#384288'} />
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
title="Koperasi"
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title={titleChoose}>
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
||||||
title="Non Aktifkan"
|
title={activeChoose ? "Non Aktifkan" : "Aktifkan"}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
title: 'Konfirmasi',
|
title: 'Konfirmasi',
|
||||||
desc: 'Apakah anda yakin ingin menonaktifkan data?',
|
desc: activeChoose ? 'Apakah anda yakin ingin menonaktifkan data?' : 'Apakah anda yakin ingin mengaktifkan data?',
|
||||||
onPress: () => { handleEdit() }
|
onPress: () => { handleDelete() }
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
||||||
title="Edit"
|
title="Edit"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setModal(false)
|
setModal(false)
|
||||||
setVisibleEdit(true)
|
setVisibleEdit(true)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
<DrawerBottom animation="none" isVisible={isVisibleEdit} setVisible={setVisibleEdit} title="Edit Lembaga Desa">
|
<DrawerBottom animation="none" height={30} isVisible={isVisibleEdit} setVisible={setVisibleEdit} title="Edit Lembaga Desa">
|
||||||
<View style={{ justifyContent: 'space-between', flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<View>
|
||||||
<InputForm type="default" placeholder="Nama Lembaga Desa" required label="Lembaga Desa" />
|
<InputForm type="default" placeholder="Nama Lembaga Desa" required label="Lembaga Desa" value={titleChoose} onChange={setTitleChoose} />
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<ButtonForm text="SIMPAN" onPress={() => { handleEdit() }} />
|
<ButtonForm text="SIMPAN" onPress={() => { handleEdit() }} />
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a
|
|||||||
onSwipeComplete={() => setVisible(false)}
|
onSwipeComplete={() => setVisible(false)}
|
||||||
swipeDirection="down"
|
swipeDirection="down"
|
||||||
hideModalContentWhileAnimating={true}
|
hideModalContentWhileAnimating={true}
|
||||||
onBackdropPress={() => { setVisible(false) }}
|
// onBackdropPress={() => { setVisible(true) }}
|
||||||
style={[{ justifyContent: 'flex-end', margin: 0 }]}
|
style={[{ justifyContent: 'flex-end', margin: 0 }]}
|
||||||
>
|
>
|
||||||
<View style={[Styles.modalContentNew, height != undefined ? { height: `${height}%` } : { height: '25%' }]}>
|
<View style={[Styles.modalContentNew, height != undefined ? { height: `${height}%` } : { height: '25%' }]}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { View, TextInput, Text, Dimensions } from "react-native";
|
import { Dimensions, Text, TextInput, View } from "react-native";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
label?: string;
|
label?: string;
|
||||||
@@ -15,10 +15,11 @@ type Props = {
|
|||||||
round?: boolean
|
round?: boolean
|
||||||
width?: number
|
width?: number
|
||||||
bg?: 'white' | 'transparent'
|
bg?: 'white' | 'transparent'
|
||||||
|
value?: string
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export function InputForm({ label, placeholder, onChange, info, error, errorText, required, itemLeft, itemRight, type, round, width, bg }: Props) {
|
export function InputForm({ label, value, placeholder, onChange, info, error, errorText, required, itemLeft, itemRight, type, round, width, bg }: Props) {
|
||||||
const lebar = Dimensions.get("window").width;
|
const lebar = Dimensions.get("window").width;
|
||||||
|
|
||||||
if (itemLeft != undefined || itemRight != undefined) {
|
if (itemLeft != undefined || itemRight != undefined) {
|
||||||
@@ -35,10 +36,11 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
|
|||||||
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, Styles.pv10]}>
|
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, Styles.pv10]}>
|
||||||
{itemRight != undefined ? itemRight : itemLeft}
|
{itemRight != undefined ? itemRight : itemLeft}
|
||||||
<TextInput
|
<TextInput
|
||||||
|
value={value}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
keyboardType={type}
|
keyboardType={type}
|
||||||
onChangeText={onChange}
|
onChangeText={onChange}
|
||||||
style={[Styles.mh05, { width: width ? lebar * width / 100: lebar*0.78 }]}
|
style={[Styles.mh05, { width: width ? lebar * width / 100 : lebar * 0.78 }]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
|
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
|
||||||
@@ -60,6 +62,7 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
<TextInput
|
<TextInput
|
||||||
|
value={value}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
keyboardType={type}
|
keyboardType={type}
|
||||||
style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}
|
style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}
|
||||||
|
|||||||
33
lib/api.ts
33
lib/api.ts
@@ -49,6 +49,39 @@ export const apiGetDataHome = async ({ cat, user }: { cat: 'kegiatan' | 'divisio
|
|||||||
return response.data;
|
return response.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const apiGetGroup = async ({ user, active, search }: { user: string, active: string, search: string }) => {
|
||||||
|
const response = await api.get(`mobile/group?user=${user}&active=${active}&search=${search}`);
|
||||||
|
return response.data;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const apiCreateGroup = async (data: { user: string, name: string }) => {
|
||||||
|
await api.post('mobile/group', data).then(response => {
|
||||||
|
return response.data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const apiEditGroup = async (data: { user: string, name: string }, id: string) => {
|
||||||
|
await api.put(`mobile/group/${id}`, data).then(response => {
|
||||||
|
return response.data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const apiDeleteGroup = async (data: { user: string, isActive: boolean }, id: string) => {
|
||||||
|
await api.delete(`mobile/group/${id}`, { data }).then(response => {
|
||||||
|
return response.data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// export const updateEntityById = async (id: any, updatedEntity: any) => {
|
// export const updateEntityById = async (id: any, updatedEntity: any) => {
|
||||||
// const response = await api.put(`/entities/${id}`, updatedEntity);
|
// const response = await api.put(`/entities/${id}`, updatedEntity);
|
||||||
// return response.data;
|
// return response.data;
|
||||||
|
|||||||
14
lib/groupSlice.ts
Normal file
14
lib/groupSlice.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { createSlice } from '@reduxjs/toolkit';
|
||||||
|
|
||||||
|
const groupUpdate = createSlice({
|
||||||
|
name: 'groupUpdate',
|
||||||
|
initialState: false,
|
||||||
|
reducers: {
|
||||||
|
setUpdateGroup: (state, action) => {
|
||||||
|
return action.payload;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const { setUpdateGroup } = groupUpdate.actions;
|
||||||
|
export default groupUpdate.reducer;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { configureStore } from '@reduxjs/toolkit';
|
import { configureStore } from '@reduxjs/toolkit';
|
||||||
import bannerReducer from './bannerSlice';
|
import bannerReducer from './bannerSlice';
|
||||||
import entitiesReducer from './entitiesSlice';
|
import entitiesReducer from './entitiesSlice';
|
||||||
|
import groupUpdate from './groupSlice';
|
||||||
import userReducer from './userSlice';
|
import userReducer from './userSlice';
|
||||||
|
|
||||||
|
|
||||||
@@ -8,7 +9,8 @@ const store = configureStore({
|
|||||||
reducer: {
|
reducer: {
|
||||||
entities: entitiesReducer,
|
entities: entitiesReducer,
|
||||||
banner: bannerReducer,
|
banner: bannerReducer,
|
||||||
user: userReducer
|
user: userReducer,
|
||||||
|
groupUpdate: groupUpdate
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user