Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

first commit #8

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
2,986 changes: 335 additions & 2,651 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"start": "next start"
},
"dependencies": {
"axios": "^0.21.1",
"cors": "^2.8.5",
"next": "11.0.0",
"react": "17.0.2",
"react-dom": "17.0.2"
"react-dom": "17.0.2",
"styled-components": "^5.3.0"
}
}
31 changes: 26 additions & 5 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
import Head from "next/head";
import styles from "../styles/Home.module.css";
import { useEffect, useState } from "react"
import RightSection from "../src/molecules/RightSection"
import LeftSection from "../src/molecules/LeftSection"
import CenterContent from "../src/organism/Home/CenterContent"




export default function Home() {
const [data, setData] = useState()
const [selectedElement, setSelectedElement] = useState()
useEffect(async () => {

const res = await fetch('http://localhost:3000/api/containers')
const response = await res.json()
setData(response.data.containers)

}, [])
const selectElement = (element) => {
const selectedData = data.filter((item) => item.name === element)
setSelectedElement(selectedData[0])
}

return (
<div className={styles.mainTitle}>
<h1>99minutos Fast Frontend Test</h1>
</div>
<CenterContent>
<LeftSection items={data} selectElement={selectElement} selectedElement={selectedElement} />

<RightSection selectedElement={selectedElement} />
</CenterContent>
);
}
Binary file added public/icons/24-hours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading