Skip to content

Commit

Permalink
Agent Profile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushjindal committed Jun 8, 2024
1 parent 7dfed97 commit 9ba7787
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions blocks/agent-profile/agent-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const getPhoneDiv = () => {
let phoneUl;

if (getMetadata('direct-phone')) {
phoneUl = ul({});
phoneUl.append(li({}, 'Direct: ', getMetadata('direct-phone')));
phoneUl = ul();
phoneUl.append(li('Direct: ', getMetadata('direct-phone')));
}

if (getMetadata('office-phone')) {
phoneUl = phoneUl || ul({});
phoneUl.append(li({}, 'Office: ', getMetadata('office-phone')));
phoneUl = phoneUl || ul();
phoneUl.append(li('Office: ', getMetadata('office-phone')));
}

if (phoneUl) {
Expand Down Expand Up @@ -62,9 +62,9 @@ const getSocialDiv = () => {

['facebook', 'instagram', 'linkedin'].forEach((x) => {
const url = getMetadata(x);
socialUl = socialUl || ul({});
socialUl = socialUl || ul();
if (url) {
const socialLi = li({}, a({
const socialLi = li(a({
href: url, class: x, title: x, 'aria-label': x,
}, span({ class: `icon icon-${x}` })));
socialUl.append(socialLi);
Expand All @@ -82,7 +82,7 @@ const getSocialDiv = () => {
export default async function decorate(block) {
const profileImage = getImageDiv();
const profileContent = div({ class: 'profile-content' },
div({ class: 'name' }, h1({}, getMetadata('name'))),
div({ class: 'name' }, h1(getMetadata('name'))),
div({ class: 'designation' }, getMetadata('designation')),
);

Expand Down

0 comments on commit 9ba7787

Please sign in to comment.