feat(webpack-react): read *.json file
This commit is contained in:
parent
810b53625a
commit
f4de3318d1
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import Hello from '../components/hello';
|
||||
import '../style.css';
|
||||
|
||||
// import JSON osmQueryJson
|
||||
// import JSON
|
||||
import jsonOsmQuery from '../osm-query.json';
|
||||
|
||||
const Home = () => {
|
||||
|
@ -17,10 +17,10 @@ const Home = () => {
|
|||
<div className='container'>
|
||||
<p>Blog RryOsmQuery</p>
|
||||
<div className='rryOsmQuery'>
|
||||
{rryOsmQuery.map((post) => (
|
||||
<div className='post' key={post.id}>
|
||||
<p className='title'>{post.title}</p>
|
||||
<p className='content'>{post.query}</p>
|
||||
{rryOsmQuery.map((query) => (
|
||||
<div className='query' key={query.id}>
|
||||
<p className='title'>{query.title}</p>
|
||||
<p className='content'>{query.query}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue