@greatapps/common 1.1.119 → 1.1.121
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.
|
@@ -13,7 +13,8 @@ function AppNavBar({
|
|
|
13
13
|
onExpandClick,
|
|
14
14
|
menuItems = [],
|
|
15
15
|
onCreditsClick,
|
|
16
|
-
onNotificationsViewAll
|
|
16
|
+
onNotificationsViewAll,
|
|
17
|
+
logoutRedirect
|
|
17
18
|
}) {
|
|
18
19
|
const router = useRouter();
|
|
19
20
|
const { openConfigurations } = useAccountModals();
|
|
@@ -34,7 +35,8 @@ function AppNavBar({
|
|
|
34
35
|
{
|
|
35
36
|
onEditProfile: () => openConfigurations(),
|
|
36
37
|
onCreditsClick,
|
|
37
|
-
menuItems
|
|
38
|
+
menuItems,
|
|
39
|
+
logoutRedirect
|
|
38
40
|
}
|
|
39
41
|
)
|
|
40
42
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layouts/AppNavBar.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRouter } from \"next/navigation\";\nimport { NavBar } from \"./NavBar\";\nimport { ProfilePopover } from \"./ProfilePopover\";\nimport { NotificationsPopover } from \"./NotificationsPopover\";\nimport { useAccountModals } from \"../../store/useAccountModals\";\nimport type { ProfileMenuItem } from \"./ProfilePopover\";\n\nexport interface AppNavBarProps {\n onLogoClick?: () => void;\n /** Which app is currently active — controls which icon gets the indicator */\n activeApp?: \"gapps\" | \"gpages\";\n appIconHref?: string;\n showExpandButton?: boolean;\n onExpandClick?: () => void;\n menuItems?: ProfileMenuItem[];\n onCreditsClick?: () => void;\n onNotificationsViewAll?: () => void;\n}\n\nexport function AppNavBar({\n onLogoClick,\n activeApp,\n appIconHref = \"/\",\n showExpandButton = false,\n onExpandClick,\n menuItems = [],\n onCreditsClick,\n onNotificationsViewAll,\n}: AppNavBarProps) {\n const router = useRouter();\n const { openConfigurations } = useAccountModals();\n\n const handleLogoClick = onLogoClick ?? (() => router.push(\"/\"));\n const handleAppIconClick = () => router.push(appIconHref);\n\n return (\n <NavBar\n onLogoClick={handleLogoClick}\n onAppIconClick={handleAppIconClick}\n activeApp={activeApp}\n showExpandButton={showExpandButton}\n onExpandClick={onExpandClick}\n >\n <NotificationsPopover onViewAll={onNotificationsViewAll} />\n <ProfilePopover\n onEditProfile={() => openConfigurations()}\n onCreditsClick={onCreditsClick}\n menuItems={menuItems}\n />\n </NavBar>\n );\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layouts/AppNavBar.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRouter } from \"next/navigation\";\nimport { NavBar } from \"./NavBar\";\nimport { ProfilePopover } from \"./ProfilePopover\";\nimport { NotificationsPopover } from \"./NotificationsPopover\";\nimport { useAccountModals } from \"../../store/useAccountModals\";\nimport type { ProfileMenuItem } from \"./ProfilePopover\";\n\nexport interface AppNavBarProps {\n onLogoClick?: () => void;\n /** Which app is currently active — controls which icon gets the indicator */\n activeApp?: \"gapps\" | \"gpages\";\n appIconHref?: string;\n showExpandButton?: boolean;\n onExpandClick?: () => void;\n menuItems?: ProfileMenuItem[];\n onCreditsClick?: () => void;\n onNotificationsViewAll?: () => void;\n logoutRedirect?: string;\n}\n\nexport function AppNavBar({\n onLogoClick,\n activeApp,\n appIconHref = \"/\",\n showExpandButton = false,\n onExpandClick,\n menuItems = [],\n onCreditsClick,\n onNotificationsViewAll,\n logoutRedirect,\n}: AppNavBarProps) {\n const router = useRouter();\n const { openConfigurations } = useAccountModals();\n\n const handleLogoClick = onLogoClick ?? (() => router.push(\"/\"));\n const handleAppIconClick = () => router.push(appIconHref);\n\n return (\n <NavBar\n onLogoClick={handleLogoClick}\n onAppIconClick={handleAppIconClick}\n activeApp={activeApp}\n showExpandButton={showExpandButton}\n onExpandClick={onExpandClick}\n >\n <NotificationsPopover onViewAll={onNotificationsViewAll} />\n <ProfilePopover\n onEditProfile={() => openConfigurations()}\n onCreditsClick={onCreditsClick}\n menuItems={menuItems}\n logoutRedirect={logoutRedirect}\n />\n </NavBar>\n );\n}\n"],"mappings":";AAwCI,SAOE,KAPF;AAtCJ,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AAgB1B,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF,GAAmB;AACjB,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,mBAAmB,IAAI,iBAAiB;AAEhD,QAAM,kBAAkB,gBAAgB,MAAM,OAAO,KAAK,GAAG;AAC7D,QAAM,qBAAqB,MAAM,OAAO,KAAK,WAAW;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,wBAAqB,WAAW,wBAAwB;AAAA,QACzD;AAAA,UAAC;AAAA;AAAA,YACC,eAAe,MAAM,mBAAmB;AAAA,YACxC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export interface AppNavBarProps {
|
|
|
17
17
|
menuItems?: ProfileMenuItem[];
|
|
18
18
|
onCreditsClick?: () => void;
|
|
19
19
|
onNotificationsViewAll?: () => void;
|
|
20
|
+
logoutRedirect?: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export function AppNavBar({
|
|
@@ -28,6 +29,7 @@ export function AppNavBar({
|
|
|
28
29
|
menuItems = [],
|
|
29
30
|
onCreditsClick,
|
|
30
31
|
onNotificationsViewAll,
|
|
32
|
+
logoutRedirect,
|
|
31
33
|
}: AppNavBarProps) {
|
|
32
34
|
const router = useRouter();
|
|
33
35
|
const { openConfigurations } = useAccountModals();
|
|
@@ -48,6 +50,7 @@ export function AppNavBar({
|
|
|
48
50
|
onEditProfile={() => openConfigurations()}
|
|
49
51
|
onCreditsClick={onCreditsClick}
|
|
50
52
|
menuItems={menuItems}
|
|
53
|
+
logoutRedirect={logoutRedirect}
|
|
51
54
|
/>
|
|
52
55
|
</NavBar>
|
|
53
56
|
);
|