Handle admin member detail form errors and simplify info
This commit is contained in:
parent
384964ca07
commit
437376fc36
|
@ -42,8 +42,7 @@ export function AdminMemberForm(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{!error ?
|
{input ?
|
||||||
input ?
|
|
||||||
<Form onSubmit={handleSubmit}>
|
<Form onSubmit={handleSubmit}>
|
||||||
<Header size='medium'>Edit Member Details</Header>
|
<Header size='medium'>Edit Member Details</Header>
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ export function AdminMemberForm(props) {
|
||||||
|
|
||||||
<Form.Input
|
<Form.Input
|
||||||
label='Expire Date'
|
label='Expire Date'
|
||||||
{...makeProps('Expire Date')}
|
{...makeProps('expire_date')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Form.Input
|
<Form.Input
|
||||||
|
@ -114,8 +113,6 @@ export function AdminMemberForm(props) {
|
||||||
</Form>
|
</Form>
|
||||||
:
|
:
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
:
|
|
||||||
<p>Error loading member</p>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -123,13 +120,10 @@ export function AdminMemberForm(props) {
|
||||||
|
|
||||||
export function AdminMemberInfo(props) {
|
export function AdminMemberInfo(props) {
|
||||||
const member = props.result.member;
|
const member = props.result.member;
|
||||||
const [error, setError] = useState(false);
|
|
||||||
const { id } = useParams();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{!error ?
|
{member ?
|
||||||
member ?
|
|
||||||
<div>
|
<div>
|
||||||
<Header size='medium'>Admin Details</Header>
|
<Header size='medium'>Admin Details</Header>
|
||||||
|
|
||||||
|
@ -188,8 +182,6 @@ export function AdminMemberInfo(props) {
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
:
|
|
||||||
<p>Error loading member</p>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user