我提前为代码的质量道歉。当我尝试将我的 html 代码放入 gatsby.js 项目的 index.js 页面时,我收到此错误:
错误在 ./src/components/section3.js 模块构建失败(来自 ./node_modules/gatsby/dist/utils/babel-loader.js):语法错误:/path/src/components/section3.js:相邻的 JSX 元素必须被包裹在一个封闭的标签中。你想要一个 JSX 片段 <>...?(26:8)
import React, { Component } from "react"
import "../css/section3.css"
class Section3 extends React.Component{
constructor(props){
super(props);
}
render(){
return(
<section>
<div class="product-banners wt-offset-top-24">
<div class="product-banners__item _toolbox">
<h3 class="product-banners__title _color-light">Lorem ipsum</h3>
<div class="product-banners__btn-wrap wt-offset-top-12">
<a class="wt-button wt-button_theme_dark wt-button_size_m wt-button_mode_outline"
href="/toolbox/app/">Lorem ipsum
</a>
</div>
</div>
<div class="product-banners__item _annual-report">
<h3 class="product-banners__title">Lorem ipsum</h3>
<div class="product-banners__btn-wrap wt-offset-top-12">
<a class="wt-button wt-button_size_m wt-button_mode_outline" href="/annualreport/2018/">Lorem ipsum</a>
</div>
</div>
</div>
</section>
翻翻过去那场雪
神不在的星期二
慕姐8265434
相关分类