return dispatch(__postGroupAdd({ groupName, description })).then(
(res) => {}
return dispatch(__postGroupAdd({ groupName, description })).then(
(res) => {
const groupId = res.payload.groupId;
}
return dispatch(__postGroupAdd({ groupName, description })).then(
(res) => {
const groupId = res.payload.groupId;
navigate(`/group/${groupId}`);
}
변수는
${}
안에 넣어주고 `으로 주소 전체 감싸기
export const PATH = {
groupdetail: (groupId) => `/group/${groupId}`,
};
import { PATH } from "../../constants/index";
navigate(PATH.groupdetail(groupId));