Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
add reward page
Browse files Browse the repository at this point in the history
  • Loading branch information
schcriher committed Aug 25, 2024
1 parent 30014b6 commit 387df43
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
29 changes: 28 additions & 1 deletion packages/nextjs/app/reward/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
"use client";

import type { NextPage } from "next";
import { useScaffoldWriteContract } from "~~/hooks/scaffold-eth";

const Home: NextPage = () => {
const { writeContractAsync: writeControllerAsync } = useScaffoldWriteContract("Controller");

return (
<>
<div className="flex items-center flex-col flex-grow pt-10">PAGE</div>
<div className="flex items-center flex-col flex-grow pt-10">
<div className="px-5">
<h1 className="text-center">
<span className="block text-6xl mb-3 font-bold">Incentivo</span>
<span className="block text-2xl mb-3">Con los objetivos cumplidos se puede reclamar el incentivo</span>
</h1>
</div>

<div className="flex flex-col justify-center items-center flex-grow w-3/5 mt-6 mb-32 px-16">
<button
className="btn btn-primary mt-8 w-100"
onClick={async () => {
try {
await writeControllerAsync({
functionName: "withdraw",
});
} catch (e) {
console.error(e);
}
}}
>
Enviar a la billetera el incentivo
</button>
</div>
</div>
</>
);
};
Expand Down
12 changes: 6 additions & 6 deletions packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ export const menuLinks: HeaderMenuLink[] = [
label: "Inicio",
href: "/",
},
{
label: "Incentivo",
href: "/reward",
icon: <BanknotesIcon className="h-4 w-4" />,
},
{
label: "Aporte",
href: "/contribution",
icon: <CurrencyDollarIcon className="h-4 w-4" />,
},
{
label: "Alta de Madre",
label: "Madre",
href: "/mother",
icon: <UserPlusIcon className="h-4 w-4" />,
},
Expand All @@ -41,11 +46,6 @@ export const menuLinks: HeaderMenuLink[] = [
href: "/approve",
icon: <CheckCircleIcon className="h-4 w-4" />,
},
{
label: "Incentivo",
href: "/reward",
icon: <BanknotesIcon className="h-4 w-4" />,
},
{
label: "Debug",
href: "/debug",
Expand Down

0 comments on commit 387df43

Please sign in to comment.