-
+
+
@@ -218,7 +331,25 @@ export function SignInDialog({
)
}
-function SignInContent() {
+function ErrorWarning({ steps }: { steps: Step[] }) {
+ if (!steps.some((step) => step.status === "error")) return null
+ return (
+
+
+
+ {steps.find((step) => step.status === "error")?.error}
+
+
+ )
+}
+
+function SignInContent({
+ steps,
+ currentStep,
+}: {
+ steps: Step[]
+ currentStep: number
+}) {
const [rememberMe, setRememberMe] = useLocalStorage(
STORAGE_REMEMBER_ME,
false,
@@ -226,8 +357,37 @@ function SignInContent() {
initializeWithValue: false,
},
)
+
+ const getIcon = (status: MutationStatus, step: number) => {
+ if (step > currentStep) return null
+ switch (status) {
+ case "pending":
+ return
+ case "success":
+ return
+ case "error":
+ return
+ default:
+ return null
+ }
+ }
+
return (
<>
+ {steps.map((step, index) => (
+
+
+
+
+ {step.description}
+
+
+ {getIcon(step.status, index)}
+
+ ))}
-
+
>
)
diff --git a/providers/wagmi-provider/wagmi-provider.tsx b/providers/wagmi-provider/wagmi-provider.tsx
index 5bf8ef3e..c7b4c6cb 100644
--- a/providers/wagmi-provider/wagmi-provider.tsx
+++ b/providers/wagmi-provider/wagmi-provider.tsx
@@ -109,11 +109,12 @@ export function WagmiProvider({
>
{children}
+ {/* TODO: Any issues with this? */}
+
-
)