Skip to content

Commit

Permalink
Fix : Next hydration error - empty Fragment
Browse files Browse the repository at this point in the history
- ๋นˆ fragment ๋ฌธ๋ฒ• (<> </>)์„ ์‚ฌ์šฉํ–ˆ์„ ๋•Œ ๋‚˜๋Š” ์˜ค๋ฅ˜ ์ œ๊ฑฐ
- fragment ๋ฌธ๋ฒ•์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด,
```js
import { Fragment } from "react";
...

return (
  <Fragment>
  </Fragment>
)
์™€ ๊ฐ™์ด ๋ช…์‹œ์ ์œผ๋กœ ์ž‘์„ฑํ•ด ์ฃผ์–ด์•ผ ํ•˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

Relate to:
[Frontend-board : /board/index.js (๊ฒŒ์‹œํŒ ๋ฉ”์ธ ํŽ˜์ด์ง€) #18
Make components for Frontend-board  #17
  • Loading branch information
Turtle-Hwan committed Oct 5, 2022
1 parent a97a2b5 commit a473abd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions frontend/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export default function Layout({ children }) {
const routerObj = { '/': 'Home', '/about': 'About' }
//console.log(router.pathname)
return (
<>
<div>
{/*<Seo title={routerObj[router.pathname]} /> */}
<Seo title={router.pathname} />
<NavBar />
<div>{children}</div>
</>
</div>
)
}
4 changes: 2 additions & 2 deletions frontend/components/board/BoardCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default function BoardCenter() {
return (
<>
</>
<div>
</div>
)
}
6 changes: 3 additions & 3 deletions frontend/components/board/BoardMiniView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default function BoardMiniView(props) {
return (
<>
<div>
{/* type:string ์— ๋”ฐ๋ผ ๋ฐฑ์—์„œ ๋‹ค๋ฅธ ๊ฐ’ ๋ฐ›์•„์˜ด. */}

<table>
Expand Down Expand Up @@ -55,7 +55,7 @@ export default function BoardMiniView(props) {

<style jsx>{`
table {
margin: 0px;
margin: 10px;
border: 1px solid purple;
width: 300px;
}
Expand All @@ -72,6 +72,6 @@ export default function BoardMiniView(props) {
flex-direction: row;
}
`}</style>
</>
</div>
)
}
4 changes: 2 additions & 2 deletions frontend/components/board/BoardNavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default function BoardNavBar() {
return (
<>
<div>
<ul>
{/*๊ฒŒ์‹œ๋ฌผ ์ขŒ์ธก*/}
<li>
Expand Down Expand Up @@ -67,6 +67,6 @@ export default function BoardNavBar() {
</li>

</ul>
</>
</div>
)
}
4 changes: 2 additions & 2 deletions frontend/components/board/BoardSearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

export default function BoardSearchBar() {
return (
<>
<div>
{/* bootstrap */}
<nav class="navbar navbar-light bg-light">
<form class="form-inline">
<input class="form-control mr-sm-2" type="search" placeholder="๊ฒŒ์‹œํŒ ๊ฒ€์ƒ‰" aria-label="Search" />
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</nav>
</>
</div>
)
}
4 changes: 2 additions & 2 deletions frontend/components/board/BoardUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export default function BoardUser(props) {
return (
<>
<div>
<div className={"box"}>
<div className={"image"}>์ด๋ฏธ์ง€</div>
<div className={"userId"}>์œ ์ €์•„์ด๋””</div>
Expand All @@ -26,6 +26,6 @@ export default function BoardUser(props) {
}
`}</style>
</>
</div>
)
}

0 comments on commit a473abd

Please sign in to comment.