From 05a9b9d1244bdf8273107ae4b75b7eb1551728be Mon Sep 17 00:00:00 2001 From: Guilherme Baufaker Date: Tue, 2 Apr 2024 00:56:15 -0300 Subject: [PATCH 1/2] finished styling myaccount --- components/ui/Icon.tsx | 2 + components/ui/MyAccount.tsx | 311 ++++++++++++++++++++++++------------ static/sprites.svg | 20 +++ 3 files changed, 227 insertions(+), 106 deletions(-) diff --git a/components/ui/Icon.tsx b/components/ui/Icon.tsx index 1f28577..7005c85 100644 --- a/components/ui/Icon.tsx +++ b/components/ui/Icon.tsx @@ -5,6 +5,7 @@ export type AvailableIcons = | "ArrowsPointingOut" | "Anexo" | "Bars3" + | "Check" | "ChevronLeft" | "ChevronRight" | "ChevronUp" @@ -22,6 +23,7 @@ export type AvailableIcons = | "FilterList" | "Heart" | "Instagram" + | "CircleCheck" | "Linkedin" | "Minus" | "MapPin" diff --git a/components/ui/MyAccount.tsx b/components/ui/MyAccount.tsx index 0e23d00..8da8d4d 100644 --- a/components/ui/MyAccount.tsx +++ b/components/ui/MyAccount.tsx @@ -6,6 +6,10 @@ import { useEffect, useState } from "preact/hooks"; import { invoke } from "../../runtime.ts"; import { Plan } from "../../components/ui/Checkout.tsx"; +import PageWrap from "../../components/ui/PageWrap.tsx"; +import Icon from "../../components/ui/Icon.tsx"; +import Slider from "../../components/ui/Slider.tsx"; +import SliderJS from "../../islands/SliderJS.tsx"; function MyAccount() { const [isLoading, setIsLoading] = useState(false); @@ -105,130 +109,225 @@ function MyAccount() { }; return ( -
-
- {isLoading - ? - : ( -
-
-

Minha Conta

-
-
- -
-
-

Alterar Senha

- -
+
+ )} + ); } diff --git a/static/sprites.svg b/static/sprites.svg index 566d337..8bf490c 100644 --- a/static/sprites.svg +++ b/static/sprites.svg @@ -1,4 +1,24 @@ + + + + + + + + + + + + + + + + + + + + From bcf79a94982ec888d84c5f80b307cc8bb21e527e Mon Sep 17 00:00:00 2001 From: Guilherme Baufaker Date: Tue, 2 Apr 2024 01:21:58 -0300 Subject: [PATCH 2/2] fixed cids include function --- components/ui/MyInfo.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/ui/MyInfo.tsx b/components/ui/MyInfo.tsx index 2275e59..6f0c1f4 100644 --- a/components/ui/MyInfo.tsx +++ b/components/ui/MyInfo.tsx @@ -420,7 +420,14 @@ function MyInfo() {
  • { - setCids([...cids, cid]); + if ( + !cids.find((c) => + (c as { full_code: string }).full_code === + cid.full_code + ) + ) { + setCids([...cids, cid]); + } }} > {cid.full_code} - {cid.name}