Skip to content

Commit 8ad70cd

Browse files
authored
Merge pull request #7 from kkang-kkang/develop
tlqkf
2 parents d737a8a + 6680cb5 commit 8ad70cd

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

kkang-kkang/src/pages/find_tx/style.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ export const Input = styled.input`
2121
`;
2222

2323
export const Title = styled.div`
24+
font-weight: 800;
2425
font-size: 48px;
2526
margin-top: 1em;
2627
text-align: center;
27-
font-weight: 800;
2828
`;
2929

3030
export const Button = styled.button`

kkang-kkang/src/pages/list_block/index.tsx

+14-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const ListBlock = () => {
1616
const [hash, setHash] = useState<string>();
1717
const [count, setCount] = useState<number>();
1818
const [onSearch, setOnSearch] = useState<boolean>(false);
19-
const [res, setRes] = useState<resProps>();
19+
const [res, setRes] = useState<resProps[]>();
2020

2121
useEffect(() => {
2222
stream();
@@ -26,7 +26,7 @@ const ListBlock = () => {
2626
await axios({
2727
method: "post",
2828
url: `${baseUrl}/list-block?head=${hash}&count=${count}`,
29-
}).then((res) => setRes(res.data[0]));
29+
}).then((res) => setRes(res.data));
3030
};
3131

3232
const btnOnClick = () => {
@@ -39,14 +39,18 @@ const ListBlock = () => {
3939
return (
4040
<S.Container>
4141
<Header />
42-
<S.Title>블럭 리스트</S.Title>
43-
{onSearch ? (
44-
<S.Flex>
45-
<S.Header>curHash : {res?.curHash}</S.Header>
46-
<S.Header>prevHash : {res?.prevHash}</S.Header>
47-
<S.Header>timestamp : {res?.timestamp}</S.Header>
48-
<S.Header>txCount : {res?.txCount}</S.Header>
49-
</S.Flex>
42+
<S.Title>블록 리스트</S.Title>
43+
{onSearch && res ? (
44+
res.map((res, index) => {
45+
return (
46+
<S.Flex>
47+
<S.Header>curHash : {res?.curHash}</S.Header>
48+
<S.Header>prevHash : {res?.prevHash}</S.Header>
49+
<S.Header>timestamp : {res?.timestamp}</S.Header>
50+
<S.Header>txCount : {res?.txCount}</S.Header>
51+
</S.Flex>
52+
);
53+
})
5054
) : (
5155
<S.container>
5256
<S.Input

kkang-kkang/src/pages/list_block/style.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ import styled from "styled-components";
33
export const Container = styled.div`
44
width: 100vw;
55
height: 100vh;
6-
overflow: hidden;
76
`;
87

98
export const Flex = styled.div`
10-
height: 80vh;
9+
height: 13em;
10+
width: 75em;
11+
border: 1px solid #fff;
1112
display: flex;
1213
align-items: center;
1314
justify-content: center;
1415
flex-direction: column;
16+
margin-top: 1em;
17+
`;
18+
19+
export const BlockNum = styled.div`
20+
font-size: 32px;
1521
`;
1622

1723
export const Title = styled.div`
@@ -60,5 +66,5 @@ export const Button = styled.button`
6066

6167
export const Header = styled.div`
6268
font-size: 24px;
63-
font-weight: 700;
69+
font-weight: 200;
6470
`;

kkang-kkang/src/styles/global.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ const style = css`
120120
}
121121
122122
color: #fff;
123+
font-weight: 200;
123124
`;
124125

125126
const Theme = `

0 commit comments

Comments
 (0)