Skip to content

Commit

Permalink
New Updated Code
Browse files Browse the repository at this point in the history
  • Loading branch information
utsavpatel562 committed Oct 5, 2024
1 parent 5ed8c85 commit fc1b13f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/listing-details/[id]/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Pricing from "../components/Pricing";
import Specification from "../components/Specification";
import Footer from "@/components/Footer";
import OwnerDetail from "../components/OwnerDetail";
import FinancialCalculator from "../components/FinancialCalculator";

function ListingDetail() {
const { id } = useParams();
Expand Down Expand Up @@ -44,6 +45,7 @@ function ListingDetail() {
<ImageGallery carDetail={carDetail} />
<Description carDetail={carDetail} />
<Features features={carDetail?.features} />
<FinancialCalculator carDetail={carDetail} />
</div>
<div>
<Pricing carDetail={carDetail} />
Expand Down
42 changes: 42 additions & 0 deletions src/listing-details/components/FinancialCalculator.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { GoArrowUpRight } from "react-icons/go";
import React from "react";

function FinancialCalculator() {
return (
<>
<div className="mt-7 p-8 rounded-xl shadow-md border">
<h2 className="font-medium text-2xl">Financial Calculator</h2>
<div className="flex gap-5 mt-5">
<div className="w-full">
<label>Price $</label>
<Input type="number" />
</div>
<div className="w-full">
<label>Interest Rate</label>
<Input type="number" />
</div>
</div>
<div className="flex gap-5 mt-5">
<div className="w-full">
<label>Loan Term (Months)</label>
<Input type="number" />
</div>
<div className="w-full">
<label>Down Payment</label>
<Input type="number" />
</div>
</div>
<Button
className="flex items-center gap-1 mt-4 text-md p-6 w-full rounded-lg"
size="lg"
>
Calculate ?
</Button>
</div>
</>
);
}

export default FinancialCalculator;

0 comments on commit fc1b13f

Please sign in to comment.