Skip to content

Commit fca71de

Browse files
committed
Image fix
1 parent fb70087 commit fca71de

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

gatsby-config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { GatsbyConfig } from "gatsby";
1+
import type { GatsbyConfig } from 'gatsby';
22

33
const config: GatsbyConfig = {
44
siteMetadata: {
@@ -10,8 +10,9 @@ const config: GatsbyConfig = {
1010
// If you use VSCode you can also use the GraphQL plugin
1111
// Learn more at: https://gatsby.dev/graphql-typegen
1212
graphqlTypegen: true,
13-
plugins: ["gatsby-plugin-sass",
14-
`gatsby-plugin-postcss`,
13+
plugins: [
14+
'gatsby-plugin-sass',
15+
`gatsby-plugin-postcss`,
1516
`gatsby-plugin-react-helmet`,
1617
`gatsby-plugin-image`,
1718
`gatsby-plugin-sharp`,
@@ -60,7 +61,7 @@ const config: GatsbyConfig = {
6061
// Use this plugin if you are deploying you site to Gatsby Cloud
6162
// To learn more, visit: https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/deploying-to-gatsby-cloud/
6263
// `gatsby-plugin-gatsby-cloud`,
63-
]
64+
],
6465
};
6566

6667
export default config;

src/components/hero.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import Button from './button';
33

44
import EnergyPage from '../images/energy-page.png';
5+
import { StaticImage } from 'gatsby-plugin-image';
56

67
const Hero = () => {
78
return (
@@ -14,7 +15,8 @@ const Hero = () => {
1415
<div className='grid lg:grid-cols-12 grid-cols-1 xl:gap-8 items-center relative'>
1516
<div className='hero-text lg:col-span-6 flex flex-col items-start pb-10 xl:pr-18 lg:pr-16 '>
1617
<h2 className='lg:text-display-lg text-display-md font-semibold pb-4'>
17-
Empowering Sustainable Energy <br></br>Through Real-Time Monitoring
18+
Empowering Sustainable Energy <br></br>Through Real-Time
19+
Monitoring
1820
</h2>
1921
<p className='text-body-md font-normal text-neutral-600 pb-8'>
2022
At Wia, we're redefining the future of energy. Our innovative
@@ -24,10 +26,13 @@ const Hero = () => {
2426
</p>
2527
<Button label='Speak to an Expert' link='/' size='lg' />
2628
</div>
27-
28-
<div className='circle-background flex relative'>
29-
<img src={EnergyPage} alt='energy-page' className='rounded-lg' />
30-
29+
30+
<div className='circle-background flex relative'>
31+
<StaticImage
32+
src='../images/energy-page.png'
33+
alt='energy-page'
34+
className='static-image rounded-lg'
35+
/>
3136
</div>
3237
</div>
3338
</div>

src/styles/styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
width: 592px;
1717
height: 592px;
1818

19-
img {
19+
.static-image {
2020
position: absolute;
2121
height: 447px;
2222
width: 828px !important;
@@ -39,7 +39,7 @@
3939
width: 300px;
4040
height: 300px;
4141
right: -100px;
42-
img {
42+
.static-image {
4343
width: 414px !important;
4444
height: 223.5px;
4545
left: 38px;

0 commit comments

Comments
 (0)