-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
600 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client' | ||
import { useEffect, useState } from "react"; | ||
|
||
export default function Box1({ salary }) { | ||
const [funds, setFunds] = useState(false) | ||
const [insurance, setInsurance] = useState(false) | ||
const [oldMomDad, setOldMomDad] = useState(false) | ||
const [charity, setCharity] = useState(false) | ||
const [reduction, setReduction] = useState(0) | ||
|
||
useEffect(() => { | ||
let newreduction = 0 | ||
if (funds) { | ||
newreduction += 5000 | ||
} | ||
if (insurance) { | ||
newreduction += 5000 | ||
} | ||
if (oldMomDad) { | ||
newreduction += 2000 | ||
} | ||
if (charity) { | ||
newreduction += 2000 | ||
} | ||
setReduction(newreduction) | ||
}, [funds, insurance, oldMomDad, charity]) | ||
|
||
return ( | ||
<div> | ||
<p className="font-bold">Salary : {salary}</p> | ||
<div><input type="checkbox" Checked={funds} onChange={() => { setFunds(!funds) }} /> Funds</div> | ||
<div><input type="checkbox" Checked={insurance} onChange={() => { setInsurance(!insurance) }} /> Insurance</div> | ||
<div><input type="checkbox" Checked={oldMomDad} onChange={() => { setOldMomDad(!oldMomDad) }} /> OldMomDad</div> | ||
<div><input type="checkbox" Checked={charity} onChange={() => { setCharity(!charity) }} /> Charity</div> | ||
<p className="font-bold">reduction : {reduction}</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Image from "next/image"; | ||
import Box from '@mui/material/Box'; | ||
import Box1 from "./box1"; | ||
export default function Box2({ salary }) { | ||
|
||
|
||
return ( | ||
<div className="flex"> | ||
<Box sx={{ minWidth: 500 }} className="p-20 relative flex justify-center items-center flex-col h-96 w-[1000px]" > | ||
<div className="w-full h-full absolute translate-x-56 translate-y-24 scale-x-75 scale-y-75 pointer-events-none rotate-90"> | ||
<Image src={"/tape.png"} width={800} height={95} | ||
className="object-top " /> | ||
</div> | ||
<div className="w-full h-full absolute -translate-x-96 translate-y-24 scale-x-75 scale-y-75 pointer-events-none rotate-90 "> | ||
<Image src={"/tape.png"} width={800} height={95} | ||
className="object-top " /> | ||
</div> | ||
<div className="w-full h-full absolute top-100 translate-x-10 pointer-events-none -z-10"> | ||
<Image src={"/kadak.png"} fill | ||
className="object-top -z-10"/> | ||
</div> | ||
<div className="flex gap-16 "> | ||
<Box1 salary={salary} /> | ||
<Box1 salary={salary} /> | ||
</div> | ||
</Box> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
import Image from "next/image"; | ||
import Filterbox from "./components/filter"; | ||
"use client" | ||
import { useEffect, useState } from "react"; | ||
import Box2 from "./components/box2"; | ||
import Box1 from "./components/box1"; | ||
|
||
const data = [{ | ||
"salary": 25000, | ||
"reduction": 5000, | ||
"how":[ | ||
{ | ||
"Funds" : {type:"Funds",name:"name"}, | ||
"Funds" : {type:"Funds",name:"name"}, | ||
"Funds" : {type:"Funds",name:"name"}, | ||
} | ||
], | ||
}] | ||
export default function Home() { | ||
|
||
return ( | ||
<main className=""> | ||
<Filterbox/> | ||
{} | ||
<main className="flex gap-5 relative"> | ||
<div className="bg-[#DEF9C4] -z-20 absolute w-full h-full"></div> | ||
<div className="min-h-screen flex w-full justify-center mt-52"> | ||
<Box2 salary={25000} /> | ||
</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.