Skip to content

Commit c37a9da

Browse files
committed
ddd
1 parent a0849d5 commit c37a9da

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

_posts/React/2023-03-27-04 리액트 props.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,19 @@ let [modalTitle, setModalTitle] = useState(0);
116116
```js
117117
function Modal(props) {
118118
return (
119-
<div className="modal" style={ %raw% }{{background: props.color
120-
{%endraw%}}}>
119+
<div className="modal" style={{ background: props.color }}>
121120
<h4>{props.title[props.index]}</h4>
122121
<p>날짜</p>
123-
<p>상세내용</p>
124-
<button onClick={() => {
125-
let strTitle = [...props.title];
126-
strTitle[props.index] = '여자코트추천';
127-
props.setTitle(strTitle);
128-
}}>글 수정</button>
122+
<p>상세내용</p>
123+
<button
124+
onClick={() => {
125+
let strTitle = [...props.title];
126+
strTitle[props.index] = '여자코트추천';
127+
props.setTitle(strTitle);
128+
}}
129+
>
130+
글 수정
131+
</button>
129132
</div>
130133
);
131134
}

_posts/React/2023-03-28-08 페이지 나누기.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ import { Routes, Route, Link } from 'react-router-dom';
7171
위와 같이 사용해주면, 해당 element를 path를 읽어와서 출력해주는 것을 볼 수 있다.
7272

7373
라우트 적용한 최종 코드
74+
<% endraw %>
75+
76+
<% raw %>
7477

7578
```jsx
7679
import './App.css';
@@ -103,7 +106,10 @@ function App() {
103106
<>
104107
<div
105108
className="main-bg"
106-
style={{ backgroundImage: `url(${bg})` }}
109+
style={{
110+
backgroundImage: `url(${bg})`,
111+
color: '',
112+
}}
107113
></div>
108114

109115
<div className="contanier">

0 commit comments

Comments
 (0)