Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

재난 디테일 페이지 추가 #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions Frontend/src/components/EventDetailBox/EventDetailBox/index.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions Frontend/src/components/EventDetailBox/EventDetailHeader/index.tsx

This file was deleted.

37 changes: 0 additions & 37 deletions Frontend/src/components/EventDetailBox/EventDetailHeader/styled.ts

This file was deleted.

79 changes: 37 additions & 42 deletions Frontend/src/components/EventDetailBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,44 @@
import React from "react";
import Styled from "styled-components";
import EnrollHeader from "./EventDetailHeader";
import EnrollInfoBox from "./EventDetailBox";
import {
EnrollBox,
Container,
TitleLabel,
InputImg,
TextLabel,
TextBox,
CheckBtn,
CheckImg,
} from "./styled";

const Container = Styled.div`
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height : 100vh;
flex-direction: column;
background-color: white;
`;
import checkimg from "@/assets/checkimg.png";
import axios from "axios";

const EnrollBox = Styled.div`
display: flex;
width: 35rem;
height : 45rem;
border: 1px solid black;
background-color: white;
border-radius: 20px 0px 0px 20px;
flex-direction: column;
`;
const EventDetailBox = (props: any) => {
const putTest = async () => {
await axios
.put(`api/v1/event?id=${props.data.id}`)
.then((res) => console.log(res))
.catch((err) => console.log(err));
};

const InputBox = Styled.input`
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
color : black;
`;

const EventDetailBox = () => {
return (
<Container>
<EnrollBox>
<EnrollHeader />
<EnrollInfoBox />
</EnrollBox>
</Container>
<EnrollBox>
<Container>
<TitleLabel>Event Detail</TitleLabel>
<InputImg src={props.data.images[0]} />
<TextLabel>재난 상황</TextLabel>
<TextBox>{props.data.category}</TextBox>

<TextLabel>내용</TextLabel>
<TextBox>{props.data.content}</TextBox>

<TextLabel>위치</TextLabel>
<TextBox>인천 부평구 충선로203번길 24</TextBox>

<CheckBtn onClick={putTest}>
<CheckImg src={checkimg} />
</CheckBtn>
</Container>
</EnrollBox>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export const TextLabel = Styled.label`
font-weight : bold;
`;

export const TextBox = Styled.text`
export const TextBox = Styled.div`
display : flex;
justify-content: center;
align-items: center;
font-size : 1rem;
width : 18rem;
height : 1.5rem;
height : fit;
padding: 10px 10px;
border-radius: 8px;
border: 1px solid #BDBDBD;
Expand All @@ -42,4 +42,47 @@ export const TextBox = Styled.text`
margin: 10px 0 40px;
box-shadow: 2px 2px 2px #BDBDBD;
outline:none;
word-break:break-all;
`;

export const EnrollBox = Styled.div`
width: 35vw;
height: 92vh;
background-color: white;
border-radius: 10px 0px 0px 10px;
flex-direction: column;
`;

export const InputImg = Styled.img`
margin : 3rem;
width : 18rem;
height : 12rem;
border-radius : 10px;

`;

export const CheckBtn = Styled.button`
all: unset;
display : flex;
width : fit;
height : fit;
border-radius : 20px;

background-color : white;
justify-content: center;
align-items: center;
outline:none;
&:hover {
cursor : pointer;
}
&:focus {
outline:none;
}

`;

export const CheckImg = Styled.img`
width : 3rem;
height : 3rem;

`;