@greatapps/common 1.1.418 → 1.1.419
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/dist/components/navigation/CancelledSubscriptionBanner.mjs +4 -1
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs.map +1 -1
- package/dist/components/navigation/NavItem.mjs +7 -4
- package/dist/components/navigation/NavItem.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/NavItems.mjs +4 -1
- package/dist/components/navigation/subcomponents/NavItems.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/navigation/CancelledSubscriptionBanner.tsx +5 -1
- package/src/components/navigation/NavItem.tsx +10 -6
- package/src/components/navigation/subcomponents/NavItems.tsx +5 -2
|
@@ -17,7 +17,10 @@ function CancelledSubscriptionBanner({ onReactivate }) {
|
|
|
17
17
|
const today = /* @__PURE__ */ new Date();
|
|
18
18
|
const isPastDue = today >= dueDate;
|
|
19
19
|
const formattedDate = formatShortDate(dueDate);
|
|
20
|
-
|
|
20
|
+
const isTrial = subscription?.type === "trial";
|
|
21
|
+
if (!visible) return null;
|
|
22
|
+
if (isTrial && !isPastDue) return null;
|
|
23
|
+
if (!isTrial && (!subscription?.date_cancellation || isPastDue)) return null;
|
|
21
24
|
return /* @__PURE__ */ jsx("div", { className: "fixed top-[80px] md:top-0 lg:left-[273px] left-0 right-0 z-[60] flex justify-center pointer-events-none px-4 lg:px-0", children: /* @__PURE__ */ jsxs(
|
|
22
25
|
"div",
|
|
23
26
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/navigation/CancelledSubscriptionBanner.tsx"],"sourcesContent":["'use client';\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { IconAlertOctagon, IconX } from '@tabler/icons-react';\nimport { formatShortDate } from '../../infra/utils/date';\nimport { useActiveSubscription } from '../../modules/subscriptions/hooks/find-active-subscription.hook';\n\ninterface CancelledSubscriptionBannerProps {\n onReactivate?: () => void;\n}\n\nexport function CancelledSubscriptionBanner({ onReactivate }: CancelledSubscriptionBannerProps) {\n const { data: { data: [subscription] = [] } = {} } = useActiveSubscription();\n const [visible, setVisible] = useState(true);\n const [animated, setAnimated] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => setAnimated(true), 50);\n return () => clearTimeout(timer);\n }, []);\n\n const dismiss = useCallback(() => setVisible(false), []);\n const dueDate = new Date(subscription?.date_due);\n const today = new Date();\n const isPastDue = today >= dueDate;\n const formattedDate = formatShortDate(dueDate);\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/navigation/CancelledSubscriptionBanner.tsx"],"sourcesContent":["'use client';\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { IconAlertOctagon, IconX } from '@tabler/icons-react';\nimport { formatShortDate } from '../../infra/utils/date';\nimport { useActiveSubscription } from '../../modules/subscriptions/hooks/find-active-subscription.hook';\n\ninterface CancelledSubscriptionBannerProps {\n onReactivate?: () => void;\n}\n\nexport function CancelledSubscriptionBanner({ onReactivate }: CancelledSubscriptionBannerProps) {\n const { data: { data: [subscription] = [] } = {} } = useActiveSubscription();\n const [visible, setVisible] = useState(true);\n const [animated, setAnimated] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => setAnimated(true), 50);\n return () => clearTimeout(timer);\n }, []);\n\n const dismiss = useCallback(() => setVisible(false), []);\n const dueDate = new Date(subscription?.date_due);\n const today = new Date();\n const isPastDue = today >= dueDate;\n const formattedDate = formatShortDate(dueDate);\n\n const isTrial = subscription?.type === 'trial';\n\n if (!visible) return null;\n if (isTrial && !isPastDue) return null;\n if (!isTrial && (!subscription?.date_cancellation || isPastDue)) return null;\n\n return (\n <div className=\"fixed top-[80px] md:top-0 lg:left-[273px] left-0 right-0 z-[60] flex justify-center pointer-events-none px-4 lg:px-0\">\n <div\n className={`flex flex-col sm:flex-row items-start sm:items-center justify-between bg-red-500 rounded-lg px-3 py-2 sm:py-1 w-full lg:w-[805px] max-w-full pointer-events-auto transition-transform duration-500 ease-out gap-2 sm:gap-0 ${animated ? 'translate-y-0 md:translate-y-9' : '-translate-y-full'}`}\n >\n <div className=\"flex items-center gap-2 flex-1 w-full sm:w-auto\">\n <IconAlertOctagon size={16} className=\"text-white shrink-0\" />\n <span className=\"paragraph-xsmall-semibold text-white\">\n {isPastDue\n ? 'Sua assinatura foi cancelada e suas páginas foram retiradas do ar.'\n : `Assinatura cancelada! Suas páginas serão retiradas do ar no dia ${formattedDate}!`}\n </span>\n </div>\n <div className=\"flex items-center gap-1.5 w-full sm:w-auto justify-between sm:justify-start\">\n <button\n type=\"button\"\n className=\"flex items-center justify-center p-1.5 cursor-pointer\"\n onClick={onReactivate}\n >\n <span className=\"paragraph-xsmall-semibold text-white underline\">\n Reativar assinatura\n </span>\n </button>\n <button type=\"button\" className=\"cursor-pointer shrink-0\" onClick={dismiss}>\n <IconX size={18} className=\"text-red-200\" />\n </button>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";AAsCQ,SACE,KADF;AApCR,SAAS,UAAU,WAAW,mBAAmB;AACjD,SAAS,kBAAkB,aAAa;AACxC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AAM/B,SAAS,4BAA4B,EAAE,aAAa,GAAqC;AAC9F,QAAM,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,sBAAsB;AAC3E,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,IAAI;AAC3C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM,YAAY,IAAI,GAAG,EAAE;AACpD,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,YAAY,MAAM,WAAW,KAAK,GAAG,CAAC,CAAC;AACvD,QAAM,UAAU,IAAI,KAAK,cAAc,QAAQ;AAC/C,QAAM,QAAQ,oBAAI,KAAK;AACvB,QAAM,YAAY,SAAS;AAC3B,QAAM,gBAAgB,gBAAgB,OAAO;AAE7C,QAAM,UAAU,cAAc,SAAS;AAEvC,MAAI,CAAC,QAAS,QAAO;AACrB,MAAI,WAAW,CAAC,UAAW,QAAO;AAClC,MAAI,CAAC,YAAY,CAAC,cAAc,qBAAqB,WAAY,QAAO;AAExE,SACE,oBAAC,SAAI,WAAU,wHACb;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,8NAA8N,WAAW,mCAAmC,mBAAmB;AAAA,MAE1S;AAAA,6BAAC,SAAI,WAAU,mDACb;AAAA,8BAAC,oBAAiB,MAAM,IAAI,WAAU,uBAAsB;AAAA,UAC5D,oBAAC,UAAK,WAAU,wCACb,sBACG,0EACA,yEAAmE,aAAa,KACtF;AAAA,WACF;AAAA,QACA,qBAAC,SAAI,WAAU,+EACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,WAAU;AAAA,cACV,SAAS;AAAA,cAET,8BAAC,UAAK,WAAU,kDAAiD,iCAEjE;AAAA;AAAA,UACF;AAAA,UACA,oBAAC,YAAO,MAAK,UAAS,WAAU,2BAA0B,SAAS,SACjE,8BAAC,SAAM,MAAM,IAAI,WAAU,gBAAe,GAC5C;AAAA,WACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
|
|
@@ -3,11 +3,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useAppNavigationContext } from "./AppNavigationContext";
|
|
4
4
|
import { useMobileNavbarSheet } from "../../store/useMobileNavbarSheet";
|
|
5
5
|
import { useMdSidebarStore } from "../../store/useMdSidebarStore";
|
|
6
|
-
function NavItem({ icon: Icon, label, onClick, isActive = false }) {
|
|
6
|
+
function NavItem({ icon: Icon, label, href, onClick, isActive = false }) {
|
|
7
7
|
const { breakpoint } = useAppNavigationContext();
|
|
8
8
|
const { close } = useMobileNavbarSheet();
|
|
9
9
|
const { collapse } = useMdSidebarStore();
|
|
10
|
-
const handleClick = () => {
|
|
10
|
+
const handleClick = (e) => {
|
|
11
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) return;
|
|
12
|
+
e.preventDefault();
|
|
11
13
|
onClick();
|
|
12
14
|
if (breakpoint === "mobile") {
|
|
13
15
|
close();
|
|
@@ -16,9 +18,10 @@ function NavItem({ icon: Icon, label, onClick, isActive = false }) {
|
|
|
16
18
|
}
|
|
17
19
|
};
|
|
18
20
|
return /* @__PURE__ */ jsxs(
|
|
19
|
-
"
|
|
21
|
+
"a",
|
|
20
22
|
{
|
|
21
|
-
|
|
23
|
+
href: href ?? "#",
|
|
24
|
+
className: `rounded-md flex items-center gap-2 p-3 cursor-pointer transition-colors no-underline ${isActive ? "bg-gray-50" : "bg-white hover:bg-gray-100"} active:bg-gray-50`,
|
|
22
25
|
onClick: handleClick,
|
|
23
26
|
children: [
|
|
24
27
|
Icon && /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/navigation/NavItem.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { ElementType } from 'react';\r\nimport { useAppNavigationContext } from './AppNavigationContext';\r\nimport { useMobileNavbarSheet } from '../../store/useMobileNavbarSheet';\r\nimport { useMdSidebarStore } from '../../store/useMdSidebarStore';\r\n\r\ninterface NavItemProps {\r\n icon?: ElementType;\r\n label: string;\r\n onClick: () => void;\r\n isActive?: boolean;\r\n}\r\n\r\nexport function NavItem({ icon: Icon, label, onClick, isActive = false }: NavItemProps) {\r\n const { breakpoint } = useAppNavigationContext();\r\n const { close } = useMobileNavbarSheet();\r\n const { collapse } = useMdSidebarStore();\r\n\r\n const handleClick = () => {\r\n onClick();\r\n if (breakpoint === 'mobile') {\r\n close();\r\n } else if (breakpoint === 'md') {\r\n collapse();\r\n }\r\n };\r\n\r\n return (\r\n <
|
|
1
|
+
{"version":3,"sources":["../../../src/components/navigation/NavItem.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { ElementType, MouseEvent } from 'react';\r\nimport { useAppNavigationContext } from './AppNavigationContext';\r\nimport { useMobileNavbarSheet } from '../../store/useMobileNavbarSheet';\r\nimport { useMdSidebarStore } from '../../store/useMdSidebarStore';\r\n\r\ninterface NavItemProps {\r\n icon?: ElementType;\r\n label: string;\r\n href?: string;\r\n onClick: () => void;\r\n isActive?: boolean;\r\n}\r\n\r\nexport function NavItem({ icon: Icon, label, href, onClick, isActive = false }: NavItemProps) {\r\n const { breakpoint } = useAppNavigationContext();\r\n const { close } = useMobileNavbarSheet();\r\n const { collapse } = useMdSidebarStore();\r\n\r\n const handleClick = (e: MouseEvent) => {\r\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) return;\r\n e.preventDefault();\r\n onClick();\r\n if (breakpoint === 'mobile') {\r\n close();\r\n } else if (breakpoint === 'md') {\r\n collapse();\r\n }\r\n };\r\n\r\n return (\r\n <a\r\n href={href ?? '#'}\r\n className={`rounded-md flex items-center gap-2 p-3 cursor-pointer transition-colors no-underline ${\r\n isActive ? 'bg-gray-50' : 'bg-white hover:bg-gray-100'\r\n } active:bg-gray-50`}\r\n onClick={handleClick}\r\n >\r\n {Icon && (\r\n <Icon\r\n size={20}\r\n className={isActive ? 'text-gray-950' : 'text-gray-400'}\r\n />\r\n )}\r\n <span className={`paragraph-small-medium ${isActive ? 'text-gray-950' : 'text-gray-500'}`}>\r\n {label}\r\n </span>\r\n </a>\r\n );\r\n}\r\n"],"mappings":";AAgCI,SAQI,KARJ;AA7BJ,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAU3B,SAAS,QAAQ,EAAE,MAAM,MAAM,OAAO,MAAM,SAAS,WAAW,MAAM,GAAiB;AAC5F,QAAM,EAAE,WAAW,IAAI,wBAAwB;AAC/C,QAAM,EAAE,MAAM,IAAI,qBAAqB;AACvC,QAAM,EAAE,SAAS,IAAI,kBAAkB;AAEvC,QAAM,cAAc,CAAC,MAAkB;AACrC,QAAI,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAG;AAC5D,MAAE,eAAe;AACjB,YAAQ;AACR,QAAI,eAAe,UAAU;AAC3B,YAAM;AAAA,IACR,WAAW,eAAe,MAAM;AAC9B,eAAS;AAAA,IACX;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ;AAAA,MACd,WAAW,wFACT,WAAW,eAAe,4BAC5B;AAAA,MACA,SAAS;AAAA,MAER;AAAA,gBACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,WAAW,WAAW,kBAAkB;AAAA;AAAA,QAC1C;AAAA,QAEF,oBAAC,UAAK,WAAW,0BAA0B,WAAW,kBAAkB,eAAe,IACpF,iBACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -3,7 +3,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { NavItem } from "../NavItem";
|
|
5
5
|
import { useNavItemsContext } from "../NavItemsContext";
|
|
6
|
+
import { useRouter } from "next/navigation";
|
|
6
7
|
function NavItems({ items }) {
|
|
8
|
+
const router = useRouter();
|
|
7
9
|
const { setNavItems } = useNavItemsContext();
|
|
8
10
|
useEffect(() => {
|
|
9
11
|
setNavItems(items);
|
|
@@ -13,8 +15,9 @@ function NavItems({ items }) {
|
|
|
13
15
|
{
|
|
14
16
|
label: item.label,
|
|
15
17
|
icon: item.icon,
|
|
18
|
+
href: item.href,
|
|
16
19
|
isActive: item.isActive,
|
|
17
|
-
onClick: item.
|
|
20
|
+
onClick: () => router.push(item.href ?? "")
|
|
18
21
|
},
|
|
19
22
|
item.label
|
|
20
23
|
)) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/navigation/subcomponents/NavItems.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { ElementType, useEffect } from 'react';\r\nimport { NavItem } from '../NavItem';\r\nimport { useNavItemsContext } from '../NavItemsContext';\r\n\r\nexport interface NavItemConfig {\r\n label: string;\r\n isActive: boolean;\r\n icon: ElementType;\r\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/navigation/subcomponents/NavItems.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { ElementType, useEffect } from 'react';\r\nimport { NavItem } from '../NavItem';\r\nimport { useNavItemsContext } from '../NavItemsContext';\r\nimport { useRouter } from 'next/navigation';\r\n\r\nexport interface NavItemConfig {\r\n label: string;\r\n isActive: boolean;\r\n icon: ElementType;\r\n href?: string;\r\n}\r\n\r\ninterface NavItemsProps {\r\n items: NavItemConfig[];\r\n}\r\n\r\nexport function NavItems({ items }: NavItemsProps) {\r\n const router = useRouter();\r\n const { setNavItems } = useNavItemsContext();\r\n\r\n useEffect(() => {\r\n setNavItems(items);\r\n }, [items, setNavItems]);\r\n\r\n return (\r\n <div className=\"flex flex-col\">\r\n {items.map((item) => (\r\n <NavItem\r\n key={item.label}\r\n label={item.label}\r\n icon={item.icon}\r\n href={item.href}\r\n isActive={item.isActive}\r\n onClick={() => router.push(item.href ?? '')}\r\n />\r\n ))}\r\n </div>\r\n );\r\n}\r\n"],"mappings":";AA6BQ;AA3BR,SAAsB,iBAAiB;AACvC,SAAS,eAAe;AACxB,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAanB,SAAS,SAAS,EAAE,MAAM,GAAkB;AACjD,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,YAAY,IAAI,mBAAmB;AAE3C,YAAU,MAAM;AACd,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,OAAO,WAAW,CAAC;AAEvB,SACE,oBAAC,SAAI,WAAU,iBACZ,gBAAM,IAAI,CAAC,SACV;AAAA,IAAC;AAAA;AAAA,MAEC,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,UAAU,KAAK;AAAA,MACf,SAAS,MAAM,OAAO,KAAK,KAAK,QAAQ,EAAE;AAAA;AAAA,IALrC,KAAK;AAAA,EAMZ,CACD,GACH;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -25,7 +25,11 @@ export function CancelledSubscriptionBanner({ onReactivate }: CancelledSubscript
|
|
|
25
25
|
const isPastDue = today >= dueDate;
|
|
26
26
|
const formattedDate = formatShortDate(dueDate);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const isTrial = subscription?.type === 'trial';
|
|
29
|
+
|
|
30
|
+
if (!visible) return null;
|
|
31
|
+
if (isTrial && !isPastDue) return null;
|
|
32
|
+
if (!isTrial && (!subscription?.date_cancellation || isPastDue)) return null;
|
|
29
33
|
|
|
30
34
|
return (
|
|
31
35
|
<div className="fixed top-[80px] md:top-0 lg:left-[273px] left-0 right-0 z-[60] flex justify-center pointer-events-none px-4 lg:px-0">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { ElementType } from 'react';
|
|
3
|
+
import { ElementType, MouseEvent } from 'react';
|
|
4
4
|
import { useAppNavigationContext } from './AppNavigationContext';
|
|
5
5
|
import { useMobileNavbarSheet } from '../../store/useMobileNavbarSheet';
|
|
6
6
|
import { useMdSidebarStore } from '../../store/useMdSidebarStore';
|
|
@@ -8,16 +8,19 @@ import { useMdSidebarStore } from '../../store/useMdSidebarStore';
|
|
|
8
8
|
interface NavItemProps {
|
|
9
9
|
icon?: ElementType;
|
|
10
10
|
label: string;
|
|
11
|
+
href?: string;
|
|
11
12
|
onClick: () => void;
|
|
12
13
|
isActive?: boolean;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export function NavItem({ icon: Icon, label, onClick, isActive = false }: NavItemProps) {
|
|
16
|
+
export function NavItem({ icon: Icon, label, href, onClick, isActive = false }: NavItemProps) {
|
|
16
17
|
const { breakpoint } = useAppNavigationContext();
|
|
17
18
|
const { close } = useMobileNavbarSheet();
|
|
18
19
|
const { collapse } = useMdSidebarStore();
|
|
19
20
|
|
|
20
|
-
const handleClick = () => {
|
|
21
|
+
const handleClick = (e: MouseEvent) => {
|
|
22
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) return;
|
|
23
|
+
e.preventDefault();
|
|
21
24
|
onClick();
|
|
22
25
|
if (breakpoint === 'mobile') {
|
|
23
26
|
close();
|
|
@@ -27,8 +30,9 @@ export function NavItem({ icon: Icon, label, onClick, isActive = false }: NavIte
|
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
return (
|
|
30
|
-
<
|
|
31
|
-
|
|
33
|
+
<a
|
|
34
|
+
href={href ?? '#'}
|
|
35
|
+
className={`rounded-md flex items-center gap-2 p-3 cursor-pointer transition-colors no-underline ${
|
|
32
36
|
isActive ? 'bg-gray-50' : 'bg-white hover:bg-gray-100'
|
|
33
37
|
} active:bg-gray-50`}
|
|
34
38
|
onClick={handleClick}
|
|
@@ -42,6 +46,6 @@ export function NavItem({ icon: Icon, label, onClick, isActive = false }: NavIte
|
|
|
42
46
|
<span className={`paragraph-small-medium ${isActive ? 'text-gray-950' : 'text-gray-500'}`}>
|
|
43
47
|
{label}
|
|
44
48
|
</span>
|
|
45
|
-
</
|
|
49
|
+
</a>
|
|
46
50
|
);
|
|
47
51
|
}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
import { ElementType, useEffect } from 'react';
|
|
4
4
|
import { NavItem } from '../NavItem';
|
|
5
5
|
import { useNavItemsContext } from '../NavItemsContext';
|
|
6
|
+
import { useRouter } from 'next/navigation';
|
|
6
7
|
|
|
7
8
|
export interface NavItemConfig {
|
|
8
9
|
label: string;
|
|
9
10
|
isActive: boolean;
|
|
10
11
|
icon: ElementType;
|
|
11
|
-
|
|
12
|
+
href?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
interface NavItemsProps {
|
|
@@ -16,6 +17,7 @@ interface NavItemsProps {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export function NavItems({ items }: NavItemsProps) {
|
|
20
|
+
const router = useRouter();
|
|
19
21
|
const { setNavItems } = useNavItemsContext();
|
|
20
22
|
|
|
21
23
|
useEffect(() => {
|
|
@@ -29,8 +31,9 @@ export function NavItems({ items }: NavItemsProps) {
|
|
|
29
31
|
key={item.label}
|
|
30
32
|
label={item.label}
|
|
31
33
|
icon={item.icon}
|
|
34
|
+
href={item.href}
|
|
32
35
|
isActive={item.isActive}
|
|
33
|
-
onClick={item.
|
|
36
|
+
onClick={() => router.push(item.href ?? '')}
|
|
34
37
|
/>
|
|
35
38
|
))}
|
|
36
39
|
</div>
|