notrab / headless-dropshipping-starter

Create your own dropshipping store with Next.js, Snipcart & Printful 👕
https://headlessdropshipping.com
712 stars 134 forks source link

Beginner: How to Edit Header & Logo #71

Closed ghost closed 1 year ago

ghost commented 2 years ago

Please give details on how to change the logo in the header, much appreciated for beginners in coding.

notrab commented 2 years ago

Hey @UnionOfAppeals

Right now this current logo is in the SVG format and can be found/replaced here: https://github.com/notrab/headless-dropshipping-starter/blob/main/src/components/Layout.tsx#L34-L45

If you wanted to use another format, such as JPG, you could use the Image component from Next.js to render the image.

You could add the following:

import Image from 'next/image'
import logo from '../../public/logo.jpg'

Then where you want to render it do something like:

<Image alt="My logo" src={logo} />