@greatapps/common 1.1.333 → 1.1.334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export default function ConfigurationsMyAccountModal() {
|
|
|
21
21
|
className={cn(
|
|
22
22
|
"flex flex-col p-0 gap-0 max-w-full sm:max-w-full overflow-x-hidden border-0",
|
|
23
23
|
"rounded-t-2xl rounded-b-none h-[100dvh] top-0 bottom-0 left-0 right-0 translate-x-0 translate-y-0",
|
|
24
|
-
"lg:w-[
|
|
24
|
+
"lg:w-[650px] lg:max-w-[650px] lg:h-auto lg:rounded-lg lg:border",
|
|
25
25
|
"lg:top-[50%] lg:bottom-auto lg:left-[50%] lg:right-auto lg:translate-x-[-50%] lg:translate-y-[-50%]"
|
|
26
26
|
)}
|
|
27
27
|
>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { IconSettings2 } from "@tabler/icons-react";
|
|
5
6
|
import { Popover } from "../ui/overlay/Popover";
|
|
6
7
|
import { Progress } from "../ui/feedback/Progress";
|
|
7
8
|
import { Separator } from "../ui/data-display/Separator";
|
|
@@ -12,6 +13,7 @@ import { useAuth } from "../../providers/auth.provider";
|
|
|
12
13
|
import { cn } from "../../infra/utils/clsx";
|
|
13
14
|
import { useIaCredits } from "../../modules/ia-credits/hooks/ia-credits.hook";
|
|
14
15
|
import { useBuyCreditsModal } from "../../store/useBuyCreditsModal";
|
|
16
|
+
import { useAccountModals } from "../../store/useAccountModals";
|
|
15
17
|
|
|
16
18
|
export interface ProfileMenuItem {
|
|
17
19
|
icon?: React.ReactNode;
|
|
@@ -39,6 +41,7 @@ function ProfilePopover({
|
|
|
39
41
|
const { summary, subscription, isSubscriptionLoading, isCreditsLoading } =
|
|
40
42
|
useIaCredits();
|
|
41
43
|
const { openModal: openBuyCreditsModal } = useBuyCreditsModal();
|
|
44
|
+
const { openConfigurations } = useAccountModals();
|
|
42
45
|
|
|
43
46
|
const handleLogout = async () => {
|
|
44
47
|
try {
|
|
@@ -133,18 +136,24 @@ function ProfilePopover({
|
|
|
133
136
|
)}
|
|
134
137
|
|
|
135
138
|
<div className="flex flex-col gap-2">
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
<div className="flex flex-col">
|
|
140
|
+
<NavBarItem
|
|
141
|
+
icon={<IconSettings2 size={20} />}
|
|
142
|
+
label="Preferências"
|
|
143
|
+
onClick={() => {
|
|
144
|
+
setPopoverOpen(false);
|
|
145
|
+
openConfigurations();
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
{menuItems.map((item, index) => (
|
|
149
|
+
<NavBarItem
|
|
150
|
+
key={index}
|
|
151
|
+
icon={item.icon}
|
|
152
|
+
label={item.label}
|
|
153
|
+
onClick={item.onClick}
|
|
154
|
+
/>
|
|
155
|
+
))}
|
|
156
|
+
</div>
|
|
148
157
|
<Separator />
|
|
149
158
|
<NavBarItem label="Sair" onClick={handleLogout} />
|
|
150
159
|
</div>
|