I have created one Static block with added below content in and I need to add social links in PWA.
<a class="footer-facebook" href="https://www.facebook.com/" target="_blank" rel="noopener">Facebook</a>
Above code is not working anyone have idea how to add URL in PWA ?
1 Answer 1
Right now there isn't just one way to set up a custom theme in PWA studio, so i'm going to show the core files as of 3.0 for an answer to the question.
In the footer file add in this code:
src/pwa-studio/packages/venia-concept/src/components/Footer/footer.js
import CmsBlock from '../CmsBlock';
render() {
 ...
 return (
 <footer className={classes.root}>
 ...
 <CmsBlock identifiers={'cms-block-name'} />
 ...
 </footer>
 )
}
This will pull in your cms by it's name into the react component. You can place the component anywhere inside the return statement. If you need to add styling to the component, i would recommend wrapping it and setting a className on the wrapper. 
- 
 My question is how can I add Social link in static block in PWAHitesh Koshti– Hitesh Koshti2019年09月20日 11:33:16 +00:00Commented Sep 20, 2019 at 11:33
- 
 Are you looking to add a link to a cms block? you just have to log into the admin and add it there undercontent > blocks. Once you have created the block, you can use the code above to have the cms block show inside the footer component (you can use this same method in any other component as well)circlesix– circlesix2019年09月20日 13:27:22 +00:00Commented Sep 20, 2019 at 13:27
- 
 I did same thing but changes not reflaced. I executed command also : yarn run watch:venia But it's not update changes.Rohan Hapani– Rohan Hapani2021年05月11日 12:11:54 +00:00Commented May 11, 2021 at 12:11
Explore related questions
See similar questions with these tags.