Merge pull request #11 from ifraimka1/feature/wpmedia

Исправить - отображение иконок соц. сетей
This commit is contained in:
Ifraim Solomonov authored and GitHub committed 2024-04-17 15:48:15 +03:00
commit 77be535b9d
1 file changed
+2 -2
+2 -2
View File
@@ -36,7 +36,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }) {
const loadData = async () => { const loadData = async () => {
const footerMedia = await getMedia('footer'); const footerMedia = await getMedia('footer');
const newMediaList = mediaList; const newMediaList = mediaList;
for (let media of footerMedia) { for (let media of footerMedia) {
newMediaList[media.name].icon = media.url; newMediaList[media.name].icon = media.url;
} }
@@ -53,7 +53,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }) {
</div> </div>
<FooterContacts contacts={ contacts } /> <FooterContacts contacts={ contacts } />
<div className="links"> <div className="links">
{ Object.keys(mediaList).forEach((link, index) => <FooterLink link={link} key={index} />) } { Object.keys(mediaList).map((link, index) => <FooterLink link={mediaList[link]} key={index} />) }
</div> </div>
</footer> </footer>
); );