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

Feature/vote #308

Merged
merged 13 commits into from
Oct 7, 2024
Merged
14 changes: 7 additions & 7 deletions apps/playground/src/data/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ export const team = [
twitter: "https://x.com/abdelkrimdev",
github: "https://github.com/abdelkrimdev",
},
{
name: "Jingles",
image: "jingles.png",
twitter: "https://x.com/jinglescode",
github: "https://github.com/jinglescode",
website: "https://jingles.dev/",
},
{
name: "Felix",
image: "felix.png",
Expand All @@ -23,6 +16,13 @@ export const team = [
twitter: "https://x.com/HinsonSIDAN",
github: "https://github.com/HinsonSIDAN",
},
{
name: "Jingles",
image: "jingles.png",
twitter: "https://x.com/jinglescode",
github: "https://github.com/jinglescode",
website: "https://jingles.dev/",
},
{
name: "Tszwai",
image: "tszwai.png",
Expand Down
18 changes: 18 additions & 0 deletions apps/playground/src/pages/about/about-us/meeting.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Button from "~/components/button/button";
import Link from "~/components/link";
import { AboutSection } from "../";

export default function AboutMeeting() {
return (
<AboutSection
title="Planning and Open Office"
description="We meet every week to discuss the progress of the project and plan the next steps every Tuesday at 1200UTC, where we welcome anyone to join us and ask questions."
>
<>
<Link href="https://calendar.google.com/calendar/u/0?cid=Y19lZjEyMDRhNGRhMDNmYzA1MWZiYTczOTIxN2E3MGMzZjAxNzI4NjBhYWQ2YTFlNGI2ZTEzNTE4ZTY5MTFlMjhhQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20">
<Button>Subscribe to Calendar</Button>
</Link>
</>
</AboutSection>
);
}
2 changes: 1 addition & 1 deletion apps/playground/src/pages/about/about-us/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AboutSection } from "../";

export default function AboutTeam() {
return (
<AboutSection title="Our team" description="">
<AboutSection title="Our Team" description="">
<div className="grid gap-8 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 lg:gap-16">
{team.map((person, i) => (
<Person key={i} {...person} />
Expand Down
4 changes: 3 additions & 1 deletion apps/playground/src/pages/about/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import AboutHero from "./about-us/hero";
import AboutIncorporation from "./about-us/incorporation";
// import AboutMeeting from "./about-us/meeting";
import AboutStatus from "./about-us/status";
import AboutTeam from "./about-us/team";

export default function AboutPage() {
return (
<>
<AboutHero />
{/* <AboutMeeting /> */}
<AboutTeam />
<AboutIncorporation />
<AboutStatus />
Expand All @@ -26,7 +28,7 @@ export function AboutSection({
return (
<section className="bg-white dark:bg-gray-900">
<div className="mx-auto max-w-screen-xl px-4 py-8 text-center lg:px-6 lg:py-16">
<div className="mx-auto mb-8 flex max-w-screen-sm flex-col gap-4 lg:mb-16">
<div className="mx-auto mb-8 flex max-w-screen-sm flex-col gap-4">
<h2 className="text-4xl font-extrabold tracking-tight text-gray-900 dark:text-white">
{title}
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import { Intro } from "../common";
import GovernanceDeregistration from "./deregistration";
import GovernanceRegistration from "./registration";
import GovernanceVoteDelegation from "./vote-delegation";
import GovernanceVote from "./vote";

const ReactPage: NextPage = () => {
const sidebarItems = [
{ label: "DRep Registration", to: "registration" },
{ label: "DRep Deregistration", to: "deregistration" },
{ label: "Vote Delegation", to: "delegation" },
{ label: "Vote", to: "vote" },
];

return (
Expand Down Expand Up @@ -44,11 +46,12 @@ const ReactPage: NextPage = () => {
the Mesh SDK.
</p>
</TitleIconDescriptionBody>
<ButtonFloatDocumentation href="https://docs.meshjs.dev/transactions/classes/Transaction" />
<ButtonFloatDocumentation href="https://docs.meshjs.dev/transactions/classes/MeshTxBuilder" />

<GovernanceRegistration />
<GovernanceDeregistration />
<GovernanceVoteDelegation />
<GovernanceVote />
</SidebarFullwidth>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,17 @@ function Right() {
throw new Error("No DRep key found, this wallet does not support CIP95");

const dRepId = dRep.dRepIDCip105;
const anchorHash = await getMeshJsonHash(anchorUrl);

let anchor: { anchorUrl: string; anchorDataHash: string } | undefined =
undefined;
if (anchorUrl.length > 0) {
const anchorHash = await getMeshJsonHash(anchorUrl);
anchor = {
anchorUrl: anchorUrl,
anchorDataHash: anchorHash,
};
}

// get utxo to pay for the registration
const utxos = await wallet.getUtxos();
const registrationFee = "500000000";
Expand All @@ -166,10 +175,7 @@ function Right() {

const txBuilder = getTxBuilder();
txBuilder
.drepRegistrationCertificate(dRepId, {
anchorUrl: anchorUrl,
anchorDataHash: anchorHash,
})
.drepRegistrationCertificate(dRepId, anchor)
.changeAddress(changeAddress)
.selectUtxosFrom(selectedUtxos);

Expand Down
Loading