Skip to content

Commit

Permalink
Remove redundant phone loading handling.
Browse files Browse the repository at this point in the history
Addresses #917 (comment)
  • Loading branch information
tomalec committed Aug 3, 2021
1 parent 2a5ab61 commit b84fdfb
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions js/src/components/contact-information/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import useGoogleMCPhoneNumber from '.~/hooks/useGoogleMCPhoneNumber';
import Section from '.~/wcdl/section';
import VerticalGapLayout from '.~/components/vertical-gap-layout';
import AppDocumentationLink from '.~/components/app-documentation-link';
import AppSpinner from '.~/components/app-spinner';
import PhoneNumberCard from './phone-number-card';

const description = __(
Expand Down Expand Up @@ -50,18 +49,14 @@ export default function ContactInformation( { view, onPhoneNumberChange } ) {
</div>
}
>
{ phone.loaded ? (
<VerticalGapLayout size="large">
<PhoneNumberCard
phoneNumber={ phone }
initEditing={ initEditing }
onPhoneNumberChange={ onPhoneNumberChange }
/>
<div>TODO: add store address card</div>
</VerticalGapLayout>
) : (
<AppSpinner />
) }
<VerticalGapLayout size="large">
<PhoneNumberCard
phoneNumber={ phone }
initEditing={ initEditing }
onPhoneNumberChange={ onPhoneNumberChange }
/>
<div>TODO: add store address card</div>
</VerticalGapLayout>
</Section>
);
}

0 comments on commit b84fdfb

Please sign in to comment.