Skip to content

Commit

Permalink
fix : code organize_1
Browse files Browse the repository at this point in the history
  • Loading branch information
raylee0519 committed Aug 3, 2022
1 parent 97333eb commit 1baba1c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 68 deletions.
4 changes: 0 additions & 4 deletions frontend/src/components/Mypage/ChangeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import {
Grid,
Typography,
Container,
styled,
TextField,
Box,
Link,
Button
} from "@mui/material";
import ChangePassWord from "./Change_password";
import ChangeNickName from "./Change_nickname";
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/Mypage/MyTrashChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { useState } from "react";
import {
Typography,
Container,
Box

} from "@mui/material";
import Chart from "../chart/Chart";
import Date from "../chart/Date";
Expand Down
18 changes: 1 addition & 17 deletions frontend/src/components/chart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,7 @@ const trashlist: Contentlist =

function TrashChart({ list }: Contentlist) {
const [BasicList, setBasicList] = useState(trashlist.list);
/*
React.useEffect(() => {
console.log("list",list);
console.log("기본 데이터",trashlist.list);
for (let i = 0; i < trashlist.list.length; i++) {
for (let j = 0; j < list.length; j++) {
if (list[j].trash_kind === trashlist.list[i].trash_kind) {
trashlist.list[i].count = list[j].cnt;
console.log("같은 것을 발견");
}
}
}
setBasicList(trashlist.list);
console.log("데이터 변환",trashlist.list);
}
, [list]);
*/

React.useEffect(() => {
console.log("list", list);
if (list) {
Expand Down
67 changes: 22 additions & 45 deletions frontend/src/components/mainpage/TrashCardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import {
Grid,
Button,
CardActionArea,
CardActions,
Card,
styled,
Box,
CardContent,
CardMedia,
Typography,
} from "@mui/material";
Expand All @@ -20,6 +18,21 @@ interface BaseContent {
images: any;
}

const StyledBox =
{
border: 0,
backgroundColor: "white",
borderColor: "#759F98",
borderRadius: 5,
boxShadow: "1px 3px 3px #B0B09A",
margin: "auto",
mt: 5
};

const styledTypo = {
fontSize: 40, component: "div", mt: 5, fontFamily: "Itim", color: "#737458"
};

const trashlist: BaseContent[] = [
{
kind: "",
Expand Down Expand Up @@ -102,23 +115,11 @@ function MultiActionAreaCard() {
>1st
</Typography>
<Box {...useScrollFadeIn('up', 1, 0.1)}>
<Box sx={{
width: 800, border: 0,
backgroundColor: "white",
borderColor: "#759F98",
borderRadius: 5,
boxShadow: "1px 3px 3px #B0B09A",
margin: "auto",
mt: 5,
}}>
<Box style={StyledBox} sx={{ width: 800 }}>
<CardActionArea sx={{ borderRadius: 5 }} >
<CardMedia component="img" height="500" width="450" image={firstData?.images} sx={{ borderRadius: 5 }} />
<Typography
fontSize={40}
component="div"
margin={1}
marginTop={2}
sx={{ fontFamily: "Itim", color: "#737458" }}
style={styledTypo}
>
{firstData?.kind}
</Typography>
Expand Down Expand Up @@ -148,23 +149,11 @@ function MultiActionAreaCard() {
>2nd
</Typography>
<Box {...useScrollFadeIn('left', 1, 0.1)}>
<Box sx={{
width: 650, border: 0,
backgroundColor: "white",
borderColor: "#759F98",
borderRadius: 5,
boxShadow: "1px 3px 3px #B0B09A",
margin: "auto",
mt: 5,
}}>
<Box style={StyledBox} sx={{ width: 650 }}>
<CardActionArea sx={{ borderRadius: 5 }}>
<CardMedia component="img" height="500" width="450" image={secondData?.images} sx={{ borderRadius: 5 }} />
<Typography
fontSize={40}
component="div"
margin={1}
marginTop={2}
sx={{ fontFamily: "Itim", color: "#737458" }}
style={styledTypo}
>
{secondData?.kind}
</Typography>
Expand Down Expand Up @@ -195,23 +184,11 @@ function MultiActionAreaCard() {
>3rd
</Typography>
<Box {...useScrollFadeIn('right', 1, 0.1)}>
<Box sx={{
width: 450, border: 1,
backgroundColor: "white",
borderColor: "white",
borderRadius: 5,
boxShadow: "1px 3px 3px #B0B09A",
margin: "auto",
mt: 5
}}>
<Box style={StyledBox} sx={{ width: 500 }}>
<CardActionArea sx={{ borderRadius: 5 }}>
<CardMedia component="img" height="500" width="450" image={thridData?.images} sx={{ borderRadius: 5 }} />
<Typography
fontSize={40}
component="div"
margin={1}
marginTop={2}
sx={{ fontFamily: "Itim", color: "#737458" }}
style={styledTypo}
>
{thridData?.kind}
</Typography>
Expand Down

0 comments on commit 1baba1c

Please sign in to comment.