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

Add: Doogly widget #112

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 40 additions & 17 deletions components/report-details/support/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { ConnectButton } from "@/components/global/connect-button";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
Expand All @@ -11,6 +13,7 @@ import { Drawer, DrawerContent, DrawerHeader } from "@/components/ui/drawer";
import { Separator } from "@/components/ui/separator";
import { useMediaQuery } from "@/hooks/use-media-query";
import type { SupportReportInfo } from "@/types";
import { DooglyDonateButton } from "@doogly/doogly-donate-component";
import Image from "next/image";
import { useState } from "react";
import { useAccount } from "wagmi";
Expand Down Expand Up @@ -140,25 +143,45 @@ const SupportReport = ({
setOpen,
};

if (isDesktop) {
return (
<ReportSupportUI
{...props}
UIComponent={Dialog}
ContentComponent={DialogContent}
HeaderComponent={DialogHeader}
/>
);
}
// if (isDesktop) {
Prajjawalk marked this conversation as resolved.
Show resolved Hide resolved
// return (
// <ReportSupportUI
// {...props}
// UIComponent={Dialog}
// ContentComponent={DialogContent}
// HeaderComponent={DialogHeader}
// />
// );
// }

// return (
// <ReportSupportUI
// {...props}
// UIComponent={Drawer}
// ContentComponent={(props) => (
// <DrawerContent {...props} className="bg-vd-beige-100 p-3" />
// )}
// HeaderComponent={DrawerHeader}
// />
// );
return (
<ReportSupportUI
{...props}
UIComponent={Drawer}
ContentComponent={(props) => (
<DrawerContent {...props} className="bg-vd-beige-100 p-3" />
)}
HeaderComponent={DrawerHeader}
<DooglyDonateButton
buttonText="Support this report"
modalTitle="Support this report"
config={{
destinationChain: "optimism",
destinationAddress: "0x8a4c14d50c43363a28647188534db7004112091c",
Prajjawalk marked this conversation as resolved.
Show resolved Hide resolved
splitsAddress: "0xD8813c65a4A21772C360f32B2C7960040fa84a8B",
hypercertFractionId: hypercertId?.split("-")[2],
poolId: 0,
}}
buttonClassName="rounded-3xl bg-vd-blue-900 text-vd-beige-100 hover:bg-vd-blue-700 dark:bg-vd-beige-100 dark:text-vd-blue-900 dark:hover:bg-vd-beige-100/90 active:outline-none active:scale-95 active:ring-2 active:ring-vd-blue-400 active:ring-offset-2"
modalStyles={{
backgroundColor: "#FAF7F5",
headingColor: "#252E56",
textColor: "#252E56",
buttonColor: "#252F55",
}}
/>
);
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@anon-aadhaar/react": "^2.4.0",
"@directus/sdk": "^15.0.2",
"@doogly/doogly-donate-component": "^1.0.4",
"@ethersproject/providers": "^5.7.2",
"@fontsource-variable/plus-jakarta-sans": "^5.0.20",
"@hookform/resolvers": "^3.3.4",
Expand Down