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 (
|
||||
<div>
|
||||
{!error ?
|
||||
input ?
|
||||
{input ?
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Header size='medium'>Edit Member Details</Header>
|
||||
|
||||
|
@ -69,7 +68,7 @@ export function AdminMemberForm(props) {
|
|||
|
||||
<Form.Input
|
||||
label='Expire Date'
|
||||
{...makeProps('Expire Date')}
|
||||
{...makeProps('expire_date')}
|
||||
/>
|
||||
|
||||
<Form.Input
|
||||
|
@ -114,8 +113,6 @@ export function AdminMemberForm(props) {
|
|||
</Form>
|
||||
:
|
||||
<p>Loading...</p>
|
||||
:
|
||||
<p>Error loading member</p>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
@ -123,13 +120,10 @@ export function AdminMemberForm(props) {
|
|||
|
||||
export function AdminMemberInfo(props) {
|
||||
const member = props.result.member;
|
||||
const [error, setError] = useState(false);
|
||||
const { id } = useParams();
|
||||
|
||||
return (
|
||||
<div>
|
||||
{!error ?
|
||||
member ?
|
||||
{member ?
|
||||
<div>
|
||||
<Header size='medium'>Admin Details</Header>
|
||||
|
||||
|
@ -188,8 +182,6 @@ export function AdminMemberInfo(props) {
|
|||
</div>
|
||||
:
|
||||
<p>Loading...</p>
|
||||
:
|
||||
<p>Error loading member</p>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user