Skip to content
Merged
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
49 changes: 49 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@tanstack/react-query": "^5.90.12",
"@tanstack/react-query-devtools": "^5.91.1",
"axios": "^1.13.2",
"framer-motion": "^12.23.26",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router-dom": "^7.11.0",
Expand Down
Binary file added src/assets/banner/banner.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 src/assets/banner/down.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 src/assets/banner/up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/pages/home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Navbar from '../../components/Navbar/Navbar';
import Alert from './components/Alert/Alert';
import Banner from './components/Banner/Banner';
import Chart from './components/Chart/Chart';

const Home = () => {
return (
<>
<Banner />
<Navbar />
<Chart />
<Alert />
Expand Down
54 changes: 54 additions & 0 deletions src/pages/home/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import bannerLogo from '../../../../assets/banner/banner.png';
import up from '../../../../assets/banner/up.png';
import down from '../../../../assets/banner/down.png';
import { motion } from 'framer-motion';

const stocks = [
{ value: 'Bitcoin', status: 'up' },
{ value: 'Ethereum', status: 'down' },
{ value: 'Solana', status: 'up' },
];

function Banner() {
return (
<div className="flex justify-center items-center gap-[5.7rem] w-full min-h-[11.8rem] border border-main rounded-4xl bg-white">
<div className="flex flex-col">
<p className="text-[2.6rem] font-bold text-main">Emotional index</p>
<div className="flex flex-row gap-[0.8rem]">
{stocks.map((stock, index) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please separate the List and Item components. :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Denied

<motion.div
key={`${stock.value}-${stock.status}`}
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.5,
delay: index * 0.2,
repeat: Infinity,
repeatDelay: 3,
}}
className="flex items-center gap-[0.4rem]"
>
<span
className={`text-[1.2rem] sm:text-[1.4rem] font-semibold ${stock.status === 'up' ? 'text-green' : 'text-red'}`}
>
{stock.value}
</span>
<img
src={stock.status === 'up' ? up : down}
alt={stock.status}
className="w-4 h-4 object-contain"
/>
</motion.div>
))}
</div>
</div>
<img
src={bannerLogo}
alt="banner-logo"
className="w-[8.4rem] h-[8.4rem]"
/>
</div>
);
}

export default Banner;
3 changes: 3 additions & 0 deletions src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
/* main color */
--color-main: #176ef7;

/* green color */
--color-green: #0bbc9d;

/* red color */
--color-red: #f84545;
--color-red-light: #fff5f5;
Expand Down