From cd6ed7dc55a1aaf19a61a0445bf68b2412f0ebb6 Mon Sep 17 00:00:00 2001 From: jahooma Date: Mon, 13 Dec 2021 18:28:37 -0600 Subject: [PATCH] Add confirmation dialog when resolving market! --- web/components/layout/col.tsx | 4 ++- web/components/layout/row.tsx | 4 ++- web/components/resolution-panel.tsx | 50 +++++++++++++++++++++-------- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/web/components/layout/col.tsx b/web/components/layout/col.tsx index da71f130..128b13f4 100644 --- a/web/components/layout/col.tsx +++ b/web/components/layout/col.tsx @@ -1,5 +1,7 @@ +import clsx from 'clsx' + export function Col(props: { children?: any; className?: string }) { const { children, className } = props - return
{children}
+ return
{children}
} diff --git a/web/components/layout/row.tsx b/web/components/layout/row.tsx index 4faaeb6c..6e4c9e91 100644 --- a/web/components/layout/row.tsx +++ b/web/components/layout/row.tsx @@ -1,5 +1,7 @@ +import clsx from 'clsx' + export function Row(props: { children?: any; className?: string }) { const { children, className } = props - return
{children}
+ return
{children}
} diff --git a/web/components/resolution-panel.tsx b/web/components/resolution-panel.tsx index 167ccdcb..2e5f59ad 100644 --- a/web/components/resolution-panel.tsx +++ b/web/components/resolution-panel.tsx @@ -19,7 +19,18 @@ export function ResolutionPanel(props: { const resolveDisabled = false - function resolve() {} + function resolve() { + console.log('resolved', outcome) + } + + const submitButtonClass = + outcome === 'YES' + ? 'btn-primary' + : outcome === 'NO' + ? 'bg-red-400 hover:bg-red-500' + : outcome === 'CANCEL' + ? 'bg-yellow-400 hover:bg-yellow-500' + : 'btn-disabled' return ( - + + + +
+
+

Are you sure you want to resolve this market?

+
+ + +
+
+
) }