const { data: members, isLoading } = useList<IMember>({
resource: 'membership/subscribers',
filters: [
{
field: 'value',
operator: 'eq',
value: submittedSearch,
},
],
})
<Box sx={{ marginTop: 2, display: 'flex', flexDirection: 'column' }}>
<Show isLoading={isLoading}></Show>
<DataGrid
rows={membersData}
columns={[
{ field: 'id', headerName: 'ID', width: 70 },
{ field: 'member_name', headerName: '주문자 이름', width: 130 },
{ field: 'member_id', headerName: '아이디', width: 130 },
{ field: 'member_phone', headerName: '휴대폰번호', width: 150 },
{ field: 'membership_grade', headerName: '멤버십 등급', width: 130 },
{ field: 'subscription_status', headerName: '구독 상태', width: 130 },
{
field: 'change_status',
headerName: '등급 변경',
width: 150,
renderCell: (params) => (
<Button variant="contained" color="primary" onClick={() => handleRowClick(params)}>
상태 변경
</Button>
),
},
]}
checkboxSelection
/>
const { data: members, isLoading } = useList<IMember>({
resource: 'membership/subscribers',
filters: [
{
field: 'value',
operator: 'eq',
value: submittedSearch,
},
],
})
<Box sx={{ marginTop: 2, display: 'flex', flexDirection: 'column' }}>
<Show isLoading={isLoading}></Show>
<DataGrid
rows={membersData}
columns={[
{ field: 'id', headerName: 'ID', width: 70 },
{ field: 'member_name', headerName: '주문자 이름', width: 130 },
{ field: 'member_id', headerName: '아이디', width: 130 },
{ field: 'member_phone', headerName: '휴대폰번호', width: 150 },
{ field: 'membership_grade', headerName: '멤버십 등급', width: 130 },
{ field: 'subscription_status', headerName: '구독 상태', width: 130 },
{
field: 'change_status',
headerName: '등급 변경',
width: 150,
renderCell: (params) => (
<Button variant="contained" color="primary" onClick={() => handleRowClick(params)}>
상태 변경
</Button>
),
},
]}
checkboxSelection
/>