import { useState } from 'react';
import ellipsisIcon from './icons/icon-ellipsis.svg';
import exerciseIcon from './icons/icon-exercise.svg';
import playIcon from './icons/icon-play.svg';
import selfCareIcon from './icons/icon-self-care.svg';
import socialIcon from './icons/icon-social.svg';
import studyIcon from './icons/icon-study.svg';
import workIcon from './icons/icon-work.svg';
import avatar from './icons/image-jeremy.png';
'Self Care': selfCareIcon,
Exercise: 'bg-green-400',
'Self Care': 'bg-yellow-300',
const dataType = ['Daily', 'Weekly', 'Monthly'];
<div className="flex md:flex-col flex-row w-full bg-[#4b3fe1] px-4 pt-4 pb-4 md:pb-16 rounded-xl">
className="mr-2 rounded-full border-white border-2"
<div className="md:mt-4 font-thin text-sm text-slate-300">
<div className="font-thin text-lg md:text-3xl text-white">
function TypeGrid({ curType, typeList, handleClick }) {
<div className="grid grid-cols-3 md:grid-cols-1 gap-1 md:mt-4 mt-2 ml-4 md:pb-4 pb-2">
{typeList.map((type) => (
className={`text-sm font-thin ${
type === curType ? 'text-white' : 'text-slate-500'
onClick={() => handleClick(type)}
function TimeCard({ title, timeFrames, type }) {
} else if (type === 'Monthly') {
const currenTime = timeFrames[type.toLowerCase()].current;
const previousTime = timeFrames[type.toLowerCase()].previous;
className={`flex relative w-[240px] h-[100px] md:w-[150px] md:h-[160px] ${bgColors[title]} rounded-lg overflow-hidden`}
className="mr-2 absolute z-10 right-2"
<div className="absolute w-full top-6 bottom-0 bg-[#1c1f4a] font-thin text-slate-200 rounded-t-lg z-20">
<div className="w-full px-4 py-4">
<div className="flex justify-between text-sm">
<div className="flex flex-row md:flex-col justify-between text-sm">
<div className="mt-2 font-thin text-xl md:text-3xl text-white">
<div className="mt-3 font-thin text-sm">
last {lastWord} - {previousTime}hrs
function TimeGrid({ type, trackList }) {
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
{trackList.map((track) => (
timeFrames={track.timeframes}
export default function DashBoard() {
const [type, setType] = useState('Weekly');
<div className="flex w-full bg-[#0e131f] px-4 p-16">
<div className="mx-auto flex flex-col md:flex-row md:shadow-xl md:rounded-xl">
<div className="flex flex-col w-[240px] md:w-[150px] bg-[#1c1f4a] rounded-xl text-white">
handleClick={(type) => setType(type)}
<div className="mt-4 md:ml-4 md:mt-0">
<TimeGrid type={type} trackList={timeData} />