i want to add images on my shopify
module develop with react but i don't know how to import images. i have creat a folder and add an image in but I cant use it in my page.
I have forgotten an import or I have written bad something?
import { EmptyState, Layout, Page } from '@shopify/polaris';
import { ResourcePicker, TitleBar } from '@shopify/app-bridge-react';
import React from 'react';
import pdt from './images/pdt.png';
const img = '.images/pdt.png';
class Index extends React.Component {
state = { open: false };
render() {
return (
<Page>
<TitleBar title="Dealer De Coque - Module"/>
<h1>Module DEALER</h1>
<ResourcePicker resourceType="Product" showVariants={false} open={this.state.open} onSelection={(resources) => this.handleSelection(resources)}
onCancel={() => this.setState({ open: false })}/>
<Layout>
<EmptyState heading="Ajoutez vos produits pour débuter"
action={{
content: 'Ajouter des produits',
onAction: () => console.log('clicked'),
onAction: () => this.setState({ open: true }),
}} image={pdt} >
<p>Vous etes seulement à quelques pas de la personnalisation de produits</p>
<img src={images/pdt.png} alt="Logo" />;
</EmptyState>
</Layout>
</Page >
);
}
handleSelection = (resources) => {
const idsFromResources = resources.selection.map((product) => product.id);
this.setState({ open: false })
console.log(idsFromResources)
};
}
export default Index;
Update from Answer:
still does not work
maybe is my folder the problem ?
here the error on the application shopify page :