Restaurant Site Project with GatsbyJS-5

Photo by Louis Hansel @shotsoflouis on Unsplash

Welcome to part-5 of the series. You can find part-4 here.

We will start to work to display a center image in the home page. First add a new file Header.js inside the utils folder and put the below content in it.

We are taking img and children as props and showing an styled-component IndexHeader. We are also importing the img an using it as default props at Line 18, which will allow u to show the image even if it is not supplied by the parent component.

Header.js

Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook. You can find more details about it here.

Gatsby Cookbook

Now, our Menu page will show the menu image.

Menu page

This completes part-5 of the series. You can find part-6 here.

You can find the code for the project in this github repo.

--

--

--

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Basics of Javascript · String · indexOf() (method)

Step-by-step Procedure to Design a News App with Ionic4 and Angular!

How to start with a tailwind CSS locally?

How to start with a tailwind CSS locally?

Setting up Nested Routes in a Note-taking App (pt 3)

Clean way to make autosubmit with redux-form

Shop4Reebok-Clone

Hi,I am Tanjina Akter.I

Updating my project to latest Angular Version (Angular 10)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nabendu Biswas

Nabendu Biswas

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

More from Medium

React App with Final Space API — Tinder Style

Bankist App: Banking made minimalist.

Getting started with Mongoose, a beginner’s perspective

How to Use Fusioncharts to Create Charts in ReactJS