Skip to content

Commit

Permalink
Merge pull request #37 from Bloceducare/development
Browse files Browse the repository at this point in the history
  • Loading branch information
codeWhizperer authored Aug 31, 2023
2 parents fed1f85 + 3d0adea commit 7c279de
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 11 deletions.
20 changes: 19 additions & 1 deletion components/Sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const Sponsors = () => {
</div>
</div>

{/* last frame desktop */}
{/* frame desktop */}
<div className="hidden md:flex md:flex-wrap md:justify-between lg:flex lg:flex-wrap items-center lg:justify-between">
<div className="flex self-end">
<Image
Expand Down Expand Up @@ -149,6 +149,15 @@ const Sponsors = () => {
/>
</div>
</div>
{/* last frame */}
<div className="hidden md:flex space-x-24 md:flex-wrap mt-2 lg:flex lg:flex-wrap items-center">
<div>
<Image src="/Arweave.png" width={250} height={150} alt="sponsor" />
</div>
<div>
<Image src="/cloudp2p.png" width={250} height={50} alt="sponsor" />
</div>
</div>

<div className="flex items-center space-x-12 md:hidden lg:hidden ">
<div className="flex self-end">
Expand Down Expand Up @@ -183,6 +192,15 @@ const Sponsors = () => {
/>
</div>
</div>

<div className="flex items-center space-x-12 mt-8 md:hidden lg:hidden ">
<div>
<Image src="/Arweave.png" width={350} height={150} alt="sponsor" />
</div>
<div>
<Image src="/cloudp2p.png" width={250} height={50} alt="sponsor" />
</div>
</div>
</div>

<div className="mt-32">
Expand Down
2 changes: 1 addition & 1 deletion data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const schedule = {
{
time: "11:20 - 11:40 AM",
topic: "Web3 Africa: State of affairs and the way forward",
speaker:"Panel 1"
speaker:"Panel 1: Lucky Henry,\n Eric Anaan,\n Harri Obi,\n Pishiken Tukura,\n Yvonne kagondu"
},
{
time: "11:40 - 11:50 AM",
Expand Down
5 changes: 3 additions & 2 deletions pages/api/participant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { NextApiRequest, NextApiResponse } from "next";
import { createRouter } from "next-connect";
import connectDB, { conferenceStatus } from "@servers/config/index";
import participantsDb from "@servers/models/participant";
import { registrationEmail, sendHackatonEmail, sendQrcodeEmail } from "@servers/mailer";
import { registrationEmail, sendHackatonEmail, sendQrcodeEmail, sendTicketEmail } from "@servers/mailer";
import cloudinary from "@servers/cloudinary";
import QRcode from "@servers/qr-code";

Expand Down Expand Up @@ -113,7 +113,8 @@ router.post(async (req, res) => {
const userData: any = new participantsDb(data);
Promise.all(
[await userData.save(),
await registrationEmail(email, type, userName),
await sendTicketEmail(email,type,userName)
// await registrationEmail(email, type, userName),
// await sendHackatonEmail(email),
// await sendQrcodeEmail(email,type, userName,qrCodeUrl)
])
Expand Down
70 changes: 70 additions & 0 deletions pages/api/ticket.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { createRouter } from "next-connect";
import connectDB, { closeDB } from "@servers/config/index";
import usersDb from "@servers/models/participant"
import { sendTicketEmail } from "@servers/mailer";


const router = createRouter<NextApiRequest, NextApiResponse>();


router.get(async (req, res) => {
const {start, max} = req.query

try {
await connectDB();
// const userRegistering = await volunteersDb.find();
const userRegistering = await usersDb.find();

const newArr = userRegistering.slice(Number(start), Number(max))


const getWithPromiseAll = async () => {
await Promise.all(
newArr.map(async (user) => {
const userType = user?.type ?? "Attendant" as string;
// const userType = user?.areaOfContribution ?? "Volunteer" ;


await usersDb.updateOne({email:user.email}, {
$set: {sentTicket: true}
})

if(!user.sentTicket){
const sendTicketemail = await sendTicketEmail(
user.email,
userType,
user.userName,
);
return sendTicketemail
}
})
);
};
await getWithPromiseAll();
await closeDB()
res.status(200).json({
data:newArr
})
// return res.status(200).json({ status: 200, data: userRegistering });
} catch (e) {
console.log("error", e);
res.status(423).json({
error: e,
});
}
});




export default router.handler({
// @ts-ignore
onError: (err, req, res, next) => {
console.error(err.stack);
res.status(500).end("Something broke!");
},
onNoMatch: (req, res) => {
res.status(404).end("Page is not found");
},
});
Binary file added public/Arweave.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/cloudp2p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions views/apply-registration/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ const ApplyAsAnAttendant = () => {

return (
<div className="p-3 mt-12">
<h1 className="my-6 text-3xl font-semibold text-center text-gray-800">
Registration Application
</h1>
<div className="p-10 mx-auto bg-white rounded-lg shadow md:w-3/4 lg:w-1/2 ">
{/* <div className="p-10 mx-auto bg-white rounded-lg shadow md:w-3/4 lg:w-1/2 ">
<h3 className="text-center">Registration has closed!! See you at the event 😊</h3>
</div>
{/* <div className="text-center">
</div> */}
<div className="text-center">
<h1 className="mb-2 text-3xl font-semibold text-gray-800">
Web3 Lagos 2023 Registration
</h1>
Expand Down Expand Up @@ -338,7 +335,7 @@ const ApplyAsAnAttendant = () => {
</TwitterShareButton>
</div>
)}
</div> */}
</div>
</div>
);
};
Expand Down

0 comments on commit 7c279de

Please sign in to comment.