Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done add Laptopforfamiliescard #48

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions components/LaptopForFamiliesCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function LaptopForFamiliesCard() {
return (
<div className="card lg:card-side bordered">
<div className="card-body">
<h2 className="card-title">Laptop for Families</h2>
<p className="mb-3">
Mail us your used or new laptop. We'll set up the donated laptops in our public
computer room for the families to use for free. Some of the donated laptops will go to
the families who don't have home computers, or who don't have enough computers for
all their children to use.
</p>
<p>
<div className="divider" />
<h3>Ship the kits to:</h3>
audreyfeldroy marked this conversation as resolved.
Show resolved Hide resolved
<p>1543 E Palmdale Blvd, Ste E, Palmdale, CA 93550</p>
</p>
</div>
</div>

)
}

export default LaptopForFamiliesCard
19 changes: 12 additions & 7 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import MainDonationForm from "../components/MainDonationForm";
import React, { useState } from "react";
import HealthWorkshopCard from "../components/HealthWorkshopCard";
import HotMealDayCard from "../components/HotMealDayCard";
import LaptopForFamiliesCard from "../components/LaptopForFamiliesCard";

const ListOfCards = [
{
Expand All @@ -14,24 +15,28 @@ const ListOfCards = [
card: <HygieneKitsCard />,
amount: 153,
},
{
card: <LaptopForFamiliesCard />,
amount: 0,
},
{
card: <HotMealDayCard />,
amount: 250,
},

];
const sortedcards = [...ListOfCards];
sortedcards.sort((a, b) => a.amount - b.amount);

function PrintCards() {

return sortedcards.map((item) => {
return(
<div>
{item.card}
<br/>
</div>
)
return (
<div>
{item.card}
<br />
</div>
)
});
}

Expand Down