diff --git a/package.json b/package.json
deleted file mode 100644
index 9733258..0000000
--- a/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "projeto_10_trackit",
- "version": "0.1.0",
- "private": true,
- "dependencies": {
- "axios": "^0.24.0",
- "dayjs": "^1.10.7",
- "react": "^17.0.2",
- "react-circular-progressbar": "^2.0.4",
- "react-dom": "^17.0.2",
- "react-loader-spinner": "^4.0.0",
- "react-router-dom": "^6.2.1",
- "react-scripts": "^4.0.3",
- "styled-components": "^5.3.3"
- },
- "scripts": {
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
- "eject": "react-scripts eject"
- },
- "eslintConfig": {
- "extends": [
- "react-app"
- ]
- },
- "browserslist": {
- "production": [
- ">0.2%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 1 chrome version",
- "last 1 firefox version",
- "last 1 safari version"
- ]
- }
-}
\ No newline at end of file
diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png
deleted file mode 100644
index b6343f3..0000000
Binary files a/public/favicon-16x16.png and /dev/null differ
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index 20fbe90..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
- Track It
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/App.js b/src/App.js
deleted file mode 100644
index 726b751..0000000
--- a/src/App.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import { BrowserRouter, Routes, Route } from "react-router-dom";
-import { useState } from "react";
-import LoginPage from "./components/LoginPage";
-import SignUpPage from "./components/SignUpPage";
-import HabitsPage from "./components/HabitsPage";
-import TodayPage from "./components/TodayPage";
-import HistoryPage from "./components/HistoryPage";
-import TokenContext from "./contexts/TokenContext";
-import UserContext from "./contexts/UserContext";
-
-export default function App() {
- const tokenOnLocalStorage = localStorage.getItem("token");
- const imageOnLocalStorage = localStorage.getItem("image");
- const [token, setToken] = useState(tokenOnLocalStorage);
- const [image, setImage] = useState(imageOnLocalStorage);
- const [progress, setProgress] = useState(0);
-
- function setAndPersistToken(token) {
- setToken(token);
- localStorage.setItem("token", token);
- }
-
- function setAndPersistUser(image) {
- setImage(image);
- localStorage.setItem("image", image);
- // localStorage.setItem("name", name);
- // localStorage.setItem("password", password);
- }
-
- return (
-
-
-
-
- } />
- } />
- } />
- } />
- } />
-
-
-
-
- );
-}
\ No newline at end of file
diff --git a/src/components/Button.js b/src/components/Button.js
deleted file mode 100644
index 53d243e..0000000
--- a/src/components/Button.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import styled from "styled-components";
-
-const Button = styled.button`
- height: 45px;
- width: 100%;
- background-color: #52B6FF;
- ${(props) => props.disabled && "opacity: 0.7;"}
- color: #FFFFFF;
- font-family: 'Lexend Deca', sans-serif;
- padding: 14px;
- ${(props) => !props.noMargin && "margin-bottom: 10px;"}
- border-radius: 4.63636px;
- border: none;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 20px;
- cursor: pointer;
-`;
-
-export default Button;
\ No newline at end of file
diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js
deleted file mode 100644
index 7e6629b..0000000
--- a/src/components/Footer/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Footer, Nav, Div, StyledLink } from "./style";
-import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
-import 'react-circular-progressbar/dist/styles.css';
-import { useContext } from "react";
-import UserContext from "../../contexts/UserContext";
-
-function FooterBox() {
- const { progress } = useContext(UserContext);
- const percentage = progress;
- return (
-
- )
-}
-
-export default FooterBox;
\ No newline at end of file
diff --git a/src/components/Footer/style.js b/src/components/Footer/style.js
deleted file mode 100644
index e6dc259..0000000
--- a/src/components/Footer/style.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import styled from "styled-components";
-import { Link } from "react-router-dom";
-
-const Footer = styled.div`
- width: 100%;
- height: 70px;
- background-color: #FFFFFF;
- position: fixed;
- bottom: 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 22px 31px 26px 36px;
-
- `;
-const Nav = styled.nav`
- color: #52B6FF;
- font-size: 18px;
- cursor: pointer;
-`;
-
-const Div = styled.div`
- width: 91px;
- height: 91px;
- margin-bottom: 40px;
-`;
-
-const StyledLink = styled(Link)`
- text-decoration: none;
- color: inherit;
-`;
-
-export {
- Footer,
- Nav,
- Div,
- StyledLink
-}
\ No newline at end of file
diff --git a/src/components/HabitsPage/index.js b/src/components/HabitsPage/index.js
deleted file mode 100644
index 004fb51..0000000
--- a/src/components/HabitsPage/index.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import axios from 'axios';
-import Header from "../Header";
-import Footer from "../Footer";
-import NewHabit from "../NewHabit";
-import { useState, useEffect, useContext } from 'react';
-import { Container, AddHabit, Title, Habit, Habits, Button, Days } from "./style";
-import TokenContext from "../../contexts/TokenContext";
-import { useNavigate } from 'react-router-dom';
-import UserContext from '../../contexts/UserContext';
-
-function HabitsPage() {
- const [habits, setHabits] = useState([]);
- const [newHabit, setNewHabit] = useState(false);
- const [name, setName] = useState('');
- const [days, setDays] = useState([]);
- const [selectedDays, setSelectedDays] = useState([]);
- const { image } = useContext(UserContext);
- const { token } = useContext(TokenContext);
-
- const weekdays = ['D', 'S', "T", 'Q', 'Q', 'S', 'S'];
- const navigate = useNavigate();
-
- function handleHabit() {
- const promise = axios.get('https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits', {
- headers: {
- Authorization: `Bearer ${token}`
- }
- });
-
- promise.then(response => {
- setHabits(response.data)
-
- });
- promise.catch(error => console.log(error.response));
- }
- useEffect(() => {
- handleHabit()
- }, []);
-
- function handleDeleteHabit(IdHabit) {
- const promise = axios.delete(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits/${IdHabit}`, {
- headers: {
- Authorization: `Bearer ${token}`
- }
- });
-
- promise.then(response => handleHabit())
- promise.catch(error => console.log(error.response))
- }
-
- return (
-
-
-
- Meus hábitos
- setNewHabit(!newHabit)}>+
-
- {newHabit && }
- {habits.length === 0 ? Você não tem nenhum hábito cadastrado ainda.
- Adicione um hábito para começar a trackear!
- :
-
- {
- habits.map((habit) => (
-
-
- {habit.name}
- {
- window.confirm("Deseja realmente excluir o hábito?") &&
- handleDeleteHabit(habit.id)
- }}>
-
-
- {
- weekdays.map((day, index) => )
- }
-
-
- ))
- }
-
- }
-
-
- );
-}
-
-export default HabitsPage;
\ No newline at end of file
diff --git a/src/components/HabitsPage/style.js b/src/components/HabitsPage/style.js
deleted file mode 100644
index 0c4ff06..0000000
--- a/src/components/HabitsPage/style.js
+++ /dev/null
@@ -1,102 +0,0 @@
-import styled from "styled-components";
-
-const Container = styled.div`
- min-height: 100vh;
- width: 100%;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-direction: column;
- background-color: #F2F2F2;
- column-gap: 28px;
- padding-top: 98px;
-
- span{
- color: #666666;
- font-size: 18px;
- padding: 17px;
- }
-`;
-
-const Title = styled.div`
- display: flex;
- justify-content: space-between;
- width: 100%;
- padding: 0 17px 0 17px;
-
- h1{
- color: #126BA5;
- font-size: 23px;
- }
-`;
-
-const AddHabit = styled.button`
- background-color: #52B6FF;
- width: 40px;
- height: 35px;
- border-radius: 5px;
- border: none;
- font-size: 27px;
- color: #FFFFFF;
- cursor: pointer;
- `;
-
-const Habits = styled.div`
- display: flex;
- flex-direction: column;
- width: 100%;
- height: auto;
- margin-top: 20px;
- gap: 10px;
- `;
-
-const Habit = styled.div`
- display: flex;
- flex-direction: column;
- height: 91px;
- margin-left: 18px;
- margin-right: 17px;
- background-color: #FFFFFF;
- border-radius: 5px;
-
- .habit-top{
- display: flex;
- justify-content: space-between;
-
- span{
- font-size: 19.976px;
- }
- ion-icon{
- padding: 11px 10px 0 0;
- cursor: pointer;
- }
- }
- `;
-
-const Button = styled.button`
- font-family: 'Lexend Deca', sans-serif;
- width: 30px;
- height: 30px;
- border-radius: 5px;
- border: 1px solid #D5D5D5;
- color: ${props => props.isSelected ? '#FFFFFF' : '#DBDBDB'};
- background-color: ${props => props.isSelected ? '#CFCFCF' : '#FFFFFF'};
- font-size: 19.976px;
- margin-bottom: 29px;
-`;
-
-const Days = styled.div`
- display: flex;
- gap: 4px;
- padding-left: 14px;
-`;
-
-export {
- Container,
- Title,
- AddHabit,
- Habits,
- Habit,
- Button,
- Days
-}
\ No newline at end of file
diff --git a/src/components/Header/index.js b/src/components/Header/index.js
deleted file mode 100644
index e3af9ea..0000000
--- a/src/components/Header/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Header, Avatar } from "./style";
-import LogoHeader from '../LogoHeader.png';
-
-function HeaderBox({ image }) {
-
- return (
-
-
-
-
- )
-}
-
-export default HeaderBox;
\ No newline at end of file
diff --git a/src/components/Header/style.js b/src/components/Header/style.js
deleted file mode 100644
index 21a511b..0000000
--- a/src/components/Header/style.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import styled from "styled-components";
-
-const Header = styled.header`
- position: fixed;
- top: 0;
- height: 70px;
- width: 100%;
- background-color: #126BA5;
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 18px;
-`;
-
-const Avatar = styled.img`
- border-radius: 50%;
- background-color: #0bb898;
- width: 51px;
- height: 51px;
- border: none;
- `;
-
-export {
- Header,
- Avatar
-}
\ No newline at end of file
diff --git a/src/components/HistoryPage/index.js b/src/components/HistoryPage/index.js
deleted file mode 100644
index 67f462c..0000000
--- a/src/components/HistoryPage/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Header from "../Header";
-import Footer from "../Footer";
-import { Container, Title } from "./style";
-
-function HistoryPage() {
- return (
-
-
-
- Histórico
-
- Em breve você poderá ver o histórico dos seus hábitos aqui!
-
-
- );
-}
-
-export default HistoryPage;
\ No newline at end of file
diff --git a/src/components/HistoryPage/style.js b/src/components/HistoryPage/style.js
deleted file mode 100644
index ca5b12a..0000000
--- a/src/components/HistoryPage/style.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import styled from "styled-components";
-
-const Container = styled.div`
- min-height: 100vh;
- width: 100%;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-direction: column;
- background-color: #F2F2F2;
- column-gap: 28px;
- padding-top: 98px;
-
- span{
- color: #666666;
- font-size: 18px;
- padding: 17px;
- }
-`;
-
-const Title = styled.div`
- display: flex;
- justify-content: space-between;
- width: 100%;
- padding: 0 17px 0 17px;
-
- h1{
- color: #126BA5;
- font-size: 23px;
- }
-`;
-
-export {
- Container,
- Title
-}
\ No newline at end of file
diff --git a/src/components/Input.js b/src/components/Input.js
deleted file mode 100644
index 97a73d4..0000000
--- a/src/components/Input.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import styled from "styled-components";
-
-const Input = styled.input`
- height: 45px;
- width: 100%;
- border: 1px solid #D5D5D5;
- background-color: ${props => props.disabled && '#F2F2F2'};
- font-family: 'Lexend Deca', sans-serif;
- padding: 14px;
- margin-bottom: 10px;
- border-radius: 5px;
- font-size: 20px;
-
- ::placeholder {
- color: #DBDBDB;
- font-family: 'Lexend Deca', sans-serif;
- font-size: 20px;
- }
-`;
-
-export default Input;
\ No newline at end of file
diff --git a/src/components/LoginPage/index.js b/src/components/LoginPage/index.js
deleted file mode 100644
index 6effb1f..0000000
--- a/src/components/LoginPage/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import axios from 'axios';
-import React, { useContext, useState } from 'react';
-import { useNavigate } from 'react-router';
-import Button from '../Button';
-import Input from '../Input';
-import Logo from '../Logo.png';
-import Loader from "react-loader-spinner";
-import TokenContext from '../../contexts/TokenContext';
-import { Container, StyledLink } from './style';
-import UserContext from '../../contexts/UserContext';
-
-function LoginPage() {
- const [email, setEmail] = useState('');
- const [password, setPassword] = useState('');
- const [isLoading, setIsLoading] = useState(false);
- const navigate = useNavigate();
-
- const { setAndPersistUser } = useContext(UserContext)
- const { setAndPersistToken } = useContext(TokenContext);
-
- function handleLogin(e) {
- e.preventDefault();
-
- const promise = axios.post(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/auth/login`, {
- email,
- password,
- });
-
- setIsLoading(true);
-
- promise.then(response => {
- // setToken(response.data.token)
- setAndPersistUser(response.data.image)
- setIsLoading(false);
- setAndPersistToken(response.data.token);
- navigate('/hoje')
- });
-
- promise.catch(error => {
- alert(error.response.data.message)
- setIsLoading(false);
- });
- }
-
- return (
-
-
-
- Não tem uma conta? Cadastre-se!
-
- );
-}
-
-export default LoginPage;
\ No newline at end of file
diff --git a/src/components/LoginPage/style.js b/src/components/LoginPage/style.js
deleted file mode 100644
index e13f6d3..0000000
--- a/src/components/LoginPage/style.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Link } from "react-router-dom";
-import styled from "styled-components";
-
-const Container = styled.div`
- min-height: 100vh;
- width: 100%;
- padding: 36px;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- background-color: #FFFFFF;
-`;
-
-const StyledLink = styled(Link)`
- height: 40px;
- font-size: 14px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #52B6FF;
-`;
-
-export {
- Container,
- StyledLink
-}
\ No newline at end of file
diff --git a/src/components/Logo.png b/src/components/Logo.png
deleted file mode 100644
index 2754f97..0000000
Binary files a/src/components/Logo.png and /dev/null differ
diff --git a/src/components/LogoHeader.png b/src/components/LogoHeader.png
deleted file mode 100644
index 31050d4..0000000
Binary files a/src/components/LogoHeader.png and /dev/null differ
diff --git a/src/components/NewHabit/index.js b/src/components/NewHabit/index.js
deleted file mode 100644
index 1431be8..0000000
--- a/src/components/NewHabit/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-import Input from "../Input";
-import { useState } from "react";
-import axios from 'axios';
-import { Container, ContainerNewHabit, Cancel, Days, Save, Options, Button } from './style';
-import { useContext } from "react/cjs/react.development";
-import TokenContext from "../../contexts/TokenContext";
-
-
-function NewHabit({ setNewHabit, weekdays, listHabits, name, days, setName, setDays, selectedDays, setSelectedDays }) {
- const { token } = useContext(TokenContext);
-
- function handleAddHabit() {
- const promise = axios.post('https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits', {
- name,
- days: selectedDays
- }, {
- headers: {
- Authorization: `Bearer ${token}`
- }
- });
- promise.then(response => {
- console.log(response.data);
- setName('');
- setDays([]);
- setSelectedDays([])
- setNewHabit(false)
- })
- promise.catch(error => {
- console.log(error.response)
- alert('Não foi possível salvar o hábito, tente novamente')
- });
- }
-
- function handleSelectedDay(day) {
- if (selectedDays.includes(day)) {
- setSelectedDays(selectedDays.filter(selectedDay => selectedDay !== day));
- return;
- }
-
- setSelectedDays([...selectedDays, day]);
- setDays(selectedDays);
- }
-
- return (
-
-
- setName(e.target.value)} />
-
- {
- weekdays.map((day, index) => (
-
- ))
- }
-
-
- setNewHabit(false)}>Cancelar
- { handleAddHabit(); listHabits() }}>Salvar
-
-
-
- )
-}
-
-export default NewHabit;
\ No newline at end of file
diff --git a/src/components/NewHabit/style.js b/src/components/NewHabit/style.js
deleted file mode 100644
index 76b989d..0000000
--- a/src/components/NewHabit/style.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import styled from "styled-components";
-
-const Container = styled.div`
- width: 98%;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-direction: column;
- background-color: #F2F2F2;
- margin-right: 18px;
- margin-left: 17px;
-`;
-
-const ContainerNewHabit = styled.div`
- width: 100%;
- height: 180px;
- background-color: #FFFFFF;
- border-radius: 5px;
- padding: 18px 16px 15px 19px;
- font-family: 'Lexend Deca', sans-serif;
- margin-right: 18px;
- margin-left: 17px;
- margin-top: 20px;
-`;
-
-const Days = styled.div`
- display: flex;
- gap: 4px;
-`;
-
-const Button = styled.button`
- font-family: 'Lexend Deca', sans-serif;
- width: 30px;
- height: 30px;
- border-radius: 5px;
- border: 1px solid #D5D5D5;
- color: ${props => props.isSelected ? '#FFFFFF' : '#DBDBDB'};
- background-color: ${props => props.isSelected ? '#CFCFCF' : '#FFFFFF'};
- font-size: 19.976px;
- margin-bottom: 29px;
- cursor: pointer;
-`;
-
-const Options = styled.div`
- display: flex;
- justify-content: flex-end;
- gap: 23px;
-`;
-
-const Cancel = styled.button`
- border: none;
- color: #52B6FF;
- background: #FFFFFF;
- font-size: 15.976px;
- font-family: 'Lexend Deca', sans-serif;
- cursor: pointer;
-`;
-
-const Save = styled.button`
- width: 84px;
- height: 35px;
- border-radius: 4.63636px;
- background-color: #52B6FF;
- color: #FFFFFF;
- border: none;
- font-size: 15.976px;
- font-family: 'Lexend Deca', sans-serif;
- cursor: pointer;
-`;
-
-export {
- Container,
- ContainerNewHabit,
- Cancel,
- Save,
- Days,
- Options,
- Button
-}
\ No newline at end of file
diff --git a/src/components/SignUpPage/index.js b/src/components/SignUpPage/index.js
deleted file mode 100644
index 3c7a3e1..0000000
--- a/src/components/SignUpPage/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import axios from 'axios';
-import React, { useState } from 'react';
-import { useNavigate } from 'react-router';
-import Button from '../Button';
-import Input from '../Input';
-import Logo from '../Logo.png';
-import Loader from "react-loader-spinner";
-
-import { Container, StyledLink } from './style';
-import { useContext } from 'react/cjs/react.development';
-import UserContext from '../../contexts/UserContext';
-
-function SignUpPage() {
- const [email, setEmail] = useState('');
- const [password, setPassword] = useState('');
- const [name, setName] = useState('');
- const [isLoading, setIsLoading] = useState(false);
- const { image, setAndPersistUser } = useContext(UserContext);
- const navigate = useNavigate();
-
- function handleSignUp(e) {
- e.preventDefault();
-
- const promise = axios.post(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/auth/sign-up`, {
- email,
- password,
- name,
- image
- });
-
- setIsLoading(true);
-
- promise.then(response => {
- setIsLoading(false);
- navigate('/')
- });
- promise.catch(error => {
- alert(error.response.data.message)
- setIsLoading(false);
- });
- }
-
- return (
-
-
-
- Já tem uma conta? Faça login!
-
- );
-}
-
-export default SignUpPage;
\ No newline at end of file
diff --git a/src/components/SignUpPage/style.js b/src/components/SignUpPage/style.js
deleted file mode 100644
index 8d8ff1f..0000000
--- a/src/components/SignUpPage/style.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Link } from "react-router-dom";
-import styled from "styled-components";
-
-const Container = styled.div`
- min-height: 100vh;
- width: 100%;
- padding: 36px;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- background-color: #FFFFFF;
-`;
-
-const StyledLink = styled(Link)`
- height: 40px;
- font-size: 14px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #52B6FF;
-`;
-
-export {
- Container,
- StyledLink
-}
\ No newline at end of file
diff --git a/src/components/TodayPage/index.js b/src/components/TodayPage/index.js
deleted file mode 100644
index 50927c9..0000000
--- a/src/components/TodayPage/index.js
+++ /dev/null
@@ -1,95 +0,0 @@
-import Header from "../Header";
-import Footer from "../Footer";
-import * as dayjs from 'dayjs';
-import 'dayjs/locale/pt-br';
-import { Container, Title, HabitBox, Habits, Checkmark } from "./style";
-import axios from "axios";
-import { useContext, useEffect, useState } from "react";
-import TokenContext from "../../contexts/TokenContext";
-import UserContext from "../../contexts/UserContext";
-
-function TodayPage() {
- let weekday = dayjs().locale('pt-br').format('dddd');
- let day = dayjs().format('DD/MM');
-
- const [habits, setHabits] = useState([]);
- const { image } = useContext(UserContext);
- const { token } = useContext(TokenContext);
- const { progress, setProgress } = useContext(UserContext);
- let accomplished = 0
-
- function handleTodayHabit() {
- const promise = axios.get('https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits/today', {
- headers: {
- Authorization: `Bearer ${token}`
- }
- });
-
- promise.then(response => {
- setHabits(response.data);
- response.data.map(habits => {
- if (habits.done) accomplished++;
-
- })
- setProgress((accomplished / habits.length) * 100)
-
- });
-
- promise.catch(error => console.log(error.response));
- }
-
- useEffect(() => {
- handleTodayHabit()
- }, []);
-
- function handleHabitDone(done, IdHabit) {
- const statusHabit = done ? 'uncheck' : 'check';
-
- const promise = axios.post(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits/${IdHabit}/${statusHabit}`, {}, {
- headers: {
- Authorization: `Bearer ${token}`
- }
- });
-
- promise.then(response => {
- handleTodayHabit()
- });
- promise.catch(error => console.log(error.response));
- }
-
- return (
-
-
-
- {weekday}, {day}
- {progress === 0 ? 'Nenhum hábito concluído ainda' :
- `${Math.round(progress)}% dos hábitos concluídos`
- }
-
-
- {
- habits.map((habit) => (
-
-
-
{habit.name}
- Sequência atual: {habit.currentSequence} dias
- Seu recorde: {habit.highestSequence} dias
-
-
- {
- handleHabitDone(habit.done, habit.id)
- }}>
-
-
-
- ))
- }
-
-
-
- );
-}
-
-export default TodayPage;
\ No newline at end of file
diff --git a/src/components/TodayPage/style.js b/src/components/TodayPage/style.js
deleted file mode 100644
index a5f9ebb..0000000
--- a/src/components/TodayPage/style.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import styled from "styled-components";
-
-const Container = styled.div`
- min-height: 100vh;
- width: 100%;
- display: flex;
- justify-content: flex-start;
- flex-direction: column;
- background-color: #F2F2F2;
- padding-top: 98px;
-`;
-
-const Title = styled.div`
- display: flex;
- flex-wrap: wrap;
- width: 100%;
- padding: 0 17px 0 17px;
- gap: 5px;
-
- h1{
- color: #126BA5;
- font-size: 23px;
- }
-
- h2{
- color: ${props => props.progress > 0 ? '#8FC549' : '#BABABA'};
- font-size: 18px;
- }
-`;
-
-const HabitBox = styled.div`
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- height: 94px;
- padding: 0 17px 0 18px;
- background-color: #ffffff;
-
- h1{
- font-size: 19.976px;
- color: #666666;
- margin-bottom: 7px;
- }
- h2{
- font-size: 12.976px;
- margin-bottom: 4px;
- color:'#666666';
- }
-
- span.current-sequence{
- color: ${props => props.isDone ? '#8FC549' : '#666666'}
- }
-
- span.record{
- color: ${props => props.record === props.currentSequence && props.record !== 0 ? '#8FC549' : '#666666'}
- }
-`;
-
-const Habits = styled.div`
- display: flex;
- flex-direction: column;
- width: 100%;
- margin-top: 11px;
- padding: 18px;
- padding-right: 17px;
- gap: 10px;
- border-radius: 5px;
-`;
-
-const Checkmark = styled.div`
- width: 69px;
- height: 69px;
- padding: 10px 10px 10px 10px;
- background-color: ${props => props.isDone ? '#8FC549' : '#EBEBEB'};
- border: 1px solid #E7E7E7;
- border-radius: 5px;
- cursor: pointer;
-
- ion-icon{
- font-size: 45px;
- --ionicon-stroke-width: 70px;
- color: #FFFFFF;
-
- }
-`;
-export {
- Container,
- Title,
- HabitBox,
- Habits,
- Checkmark
-}
diff --git a/src/contexts/TokenContext.js b/src/contexts/TokenContext.js
deleted file mode 100644
index ba23352..0000000
--- a/src/contexts/TokenContext.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import { createContext } from "react";
-
-const TokenContext = createContext();
-
-export default TokenContext;
\ No newline at end of file
diff --git a/src/contexts/UserContext.js b/src/contexts/UserContext.js
deleted file mode 100644
index a3af5ce..0000000
--- a/src/contexts/UserContext.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import { createContext } from "react";
-
-const UserContext = createContext();
-
-export default UserContext;
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
deleted file mode 100644
index a2ff380..0000000
--- a/src/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { render } from "react-dom";
-import App from './App';
-
-import './styles/reset.css';
-import './styles/style.css';
-
-render(, document.querySelector('.root'));
\ No newline at end of file
diff --git a/src/styles/reset.css b/src/styles/reset.css
deleted file mode 100644
index 2384ddf..0000000
--- a/src/styles/reset.css
+++ /dev/null
@@ -1,54 +0,0 @@
-/* http://meyerweb.com/eric/tools/css/reset/
- v2.0 | 20110126
- License: none (public domain)
-*/
-
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
-}
-
-/* HTML5 display-role reset for older browsers */
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display: block;
-}
-
-body {
- line-height: 1;
-}
-
-ol, ul {
- list-style: none;
-}
-
-blockquote, q {
- quotes: none;
-}
-
-blockquote:before, blockquote:after,
-q:before, q:after {
- content: '';
- content: none;
-}
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
\ No newline at end of file
diff --git a/src/styles/style.css b/src/styles/style.css
deleted file mode 100644
index 52bafa9..0000000
--- a/src/styles/style.css
+++ /dev/null
@@ -1,10 +0,0 @@
-@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca&family=Pacifico&display=swap');
-
-*, *::before, *::after {
- box-sizing: border-box;
-}
-
-body {
- font-family: 'Lexend Deca', sans-serif;
- font-size: 20px;
-}
\ No newline at end of file