I've been attempting to set the image as a background-image from the public folder using styled-components. I've tried the following:
import styled from "styled-components";
import Background from 'process.env.PUBLIC_URL + /images/background.svg'
export const HomeContainer = styled.section`
height: 100vh;
max-width: 100vw;
background-image: url(${Background});
background-repeat: no-repeat;
background-size: cover;
`;
and also this:
import styled from "styled-components";
export const HomeContainer = styled.section`
height: 100vh;
max-width: 100vw;
background-image: url('process.env.PUBLIC_URL + /images/background.svg');
background-repeat: no-repeat;
background-size: cover;
`;
How can I go about importing it correctly? Thanks in advance