sdy

remove unnecessary files

import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
import moment from "moment";
const HomeCalendarWrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 50%;
width: 100%;
background-color: white;
opacity: 0.8;
border-radius: 10px;
`;
const CalenderBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
`;
const CalenderMenuBox = styled.div`
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
height: 15%;
width: 100%;
`;
const DateInfoSpan = styled.span`
font-size: 15px;
font-family: "Kanit", sans-serif;
`;
const DateBodyBox = styled.div`
height: 85%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`;
const DateRow = styled.div`
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
`;
const DateText = styled.span`
text-align: center;
font-family: "Overpass", sans-serif;
color: ${(props) => {
if (props.className === "Sunday") return "#EA2027";
else if (props.className === "Saturday") return "#0652DD";
}};
`;
export default () => {
const generate = () => {
const today = moment();
const startWeek = today.clone().startOf("month").week();
const endWeek =
today.clone().endOf("month").week() === 1
? 53
: today.clone().endOf("month").week();
let calendar = [];
for (let week = startWeek; week <= endWeek; week++) {
calendar.push(
<DateRow key={week}>
{Array(7)
.fill(0)
.map((n, i) => {
let current = today
.clone()
.week(week)
.startOf("week")
.add(n + i, "day");
return (
<DateText className={`text`} key={i}>
{current.format("D")}
</DateText>
);
})}
</DateRow>
);
}
return calendar;
};
return (
<HomeCalendarWrapper>
<CalenderBox>
<CalenderMenuBox>
<FontAwesomeIcon icon={faArrowLeft} />
<DateInfoSpan>May 2020</DateInfoSpan>
<FontAwesomeIcon icon={faArrowRight} />
</CalenderMenuBox>
<DateBodyBox>
<DateRow>
<DateText className="Sunday">SUN</DateText>
<DateText>MON</DateText>
<DateText>TUE</DateText>
<DateText>WED</DateText>
<DateText>THU</DateText>
<DateText>FRI</DateText>
<DateText className="Saturday">SAT</DateText>
</DateRow>
{generate()}
</DateBodyBox>
</CalenderBox>
</HomeCalendarWrapper>
);
};
import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCheckCircle } from "@fortawesome/free-solid-svg-icons";
const CheckListBox = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 50%;
background-color: white;
opacity: 0.8;
border-radius: 10px;
`;
const ElementBox = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
`;
const IconBox = styled.div`
svg {
font-size: 15px;
}
`;
const ListContentBox = styled.div`
font-size: 15px;
`;
export default () => {
return (
<CheckListBox>
<ElementBox>
<IconBox>
<FontAwesomeIcon icon={faCheckCircle} />
</IconBox>
<ListContentBox>Check List One</ListContentBox>
</ElementBox>
</CheckListBox>
);
};
import React from "react";
import styled from "styled-components";
import HomeTodo from "./HomeTodo";
import HomeCalender from "./HomeCalendar";
import HomeCheckList from "./HomeCheckList";
import img from "../../imgs/1.jpg";
const HomeContainer = styled.div`
display: flex;
flex-direction: row;
width: 85%;
background-image: url(${img});
background-position: center;
background-size: cover;
`;
const HomeMiddleBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 70%;
`;
const HomeRightBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: space-between;
width: 30%;
`;
export default () => {
return (
<HomeContainer>
<HomeMiddleBox>
<HomeTodo />
</HomeMiddleBox>
<HomeRightBox>
<HomeCalender />
<HomeCheckList />
</HomeRightBox>
</HomeContainer>
);
};
import React, { useState, useEffect } from "react";
import styled from "styled-components";
import moment from "moment";
import Input from "../Input";
const HomeTodo = styled.div`
display: flex;
flex-direction: column;
`;
const DateBox = styled.div`
display: flex;
flex-direction: column;
input {
margin-top: 20px;
background: none;
border-bottom: 1px solid;
border-radius: 0px;
border-color: white;
}
`;
const DateSpan = styled.span`
font-size: ${(props) => {
if (props.className === "Clock") return "85px";
if (props.className === "Title") return "30px";
}};
color: white;
text-align: center;
&:not(:last-child) {
margin-bottom: 20px;
}
`;
export default () => {
const [date, setDate] = useState(moment().format("h:mm:ss"));
useEffect(() => {
let timer = setInterval(() => tick(), 1000);
return function cleanUp() {
clearInterval(timer);
};
});
function tick() {
setDate(moment().format("h:mm:ss"));
}
return (
<HomeTodo>
<DateBox>
<DateSpan className="Clock">{date}</DateSpan>
<DateSpan className="Title">Enter Todo list</DateSpan>
<Input placeholder={""} />
</DateBox>
</HomeTodo>
);
};
import React from "react";
import OTOChatPresenter from "./OTOChatPresenter";
import { withRouter } from "react-router-dom";
export default withRouter(({ match, location, history }) => {
return <OTOChatPresenter />;
});
import React from "react";
import styled from "styled-components";
import Menu from "../Menu/MenuContainer";
import { Helmet } from "react-helmet";
const Wrapper = styled.div`
width: 100%;
display: flex;
flex-direction: row;
overflow: hidden;
`;
export default () => {
return (
<Wrapper>
<Helmet>
<title>1:1 Chat</title>
</Helmet>
<Menu />
</Wrapper>
);
};