diff --git a/__tests__/app/about/section.menu.test.tsx b/__tests__/app/about/section.menu.test.tsx index 70a21eeb0e..8442b09775 100644 --- a/__tests__/app/about/section.menu.test.tsx +++ b/__tests__/app/about/section.menu.test.tsx @@ -35,12 +35,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/acceptConnectionSharing.test.tsx b/__tests__/app/acceptConnectionSharing.test.tsx index d968807240..8bed935439 100644 --- a/__tests__/app/acceptConnectionSharing.test.tsx +++ b/__tests__/app/acceptConnectionSharing.test.tsx @@ -14,12 +14,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/access.test.tsx b/__tests__/app/access.test.tsx index a7e1599a37..b04c46cfda 100644 --- a/__tests__/app/access.test.tsx +++ b/__tests__/app/access.test.tsx @@ -15,12 +15,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/additionalPages.test.tsx b/__tests__/app/additionalPages.test.tsx index cc964a8480..c4498722b3 100644 --- a/__tests__/app/additionalPages.test.tsx +++ b/__tests__/app/additionalPages.test.tsx @@ -18,12 +18,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/buidl.test.tsx b/__tests__/app/buidl.test.tsx index 54dae2da60..ad562950bc 100644 --- a/__tests__/app/buidl.test.tsx +++ b/__tests__/app/buidl.test.tsx @@ -11,12 +11,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/consolidationMappingTool.test.tsx b/__tests__/app/consolidationMappingTool.test.tsx index a2f798267b..86d8d03ff9 100644 --- a/__tests__/app/consolidationMappingTool.test.tsx +++ b/__tests__/app/consolidationMappingTool.test.tsx @@ -18,12 +18,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/delegation.component.test.tsx b/__tests__/app/delegation.component.test.tsx index 166546083a..516c9fca78 100644 --- a/__tests__/app/delegation.component.test.tsx +++ b/__tests__/app/delegation.component.test.tsx @@ -30,12 +30,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/delegationMappingToolPage.test.tsx b/__tests__/app/delegationMappingToolPage.test.tsx index 3d5dcd13a9..3c878cd925 100644 --- a/__tests__/app/delegationMappingToolPage.test.tsx +++ b/__tests__/app/delegationMappingToolPage.test.tsx @@ -18,12 +18,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/memeAccounting.test.tsx b/__tests__/app/memeAccounting.test.tsx index 443ee34a88..717bfab5e8 100644 --- a/__tests__/app/memeAccounting.test.tsx +++ b/__tests__/app/memeAccounting.test.tsx @@ -22,12 +22,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/memeGas.test.tsx b/__tests__/app/memeGas.test.tsx index 87e761d634..69bf383e5a 100644 --- a/__tests__/app/memeGas.test.tsx +++ b/__tests__/app/memeGas.test.tsx @@ -20,12 +20,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/network/index.test.tsx b/__tests__/app/network/index.test.tsx index aebd5e6531..ddb58c11d4 100644 --- a/__tests__/app/network/index.test.tsx +++ b/__tests__/app/network/index.test.tsx @@ -57,12 +57,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: () => jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/network/levels.test.tsx b/__tests__/app/network/levels.test.tsx index a42f4e0202..1891fa576a 100644 --- a/__tests__/app/network/levels.test.tsx +++ b/__tests__/app/network/levels.test.tsx @@ -18,12 +18,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/network/nerd/index.active.test.tsx b/__tests__/app/network/nerd/index.active.test.tsx index 793b8334e2..96f4b6727d 100644 --- a/__tests__/app/network/nerd/index.active.test.tsx +++ b/__tests__/app/network/nerd/index.active.test.tsx @@ -32,12 +32,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/network/nerd/index.test.tsx b/__tests__/app/network/nerd/index.test.tsx index b9efcffb1b..6b37c20447 100644 --- a/__tests__/app/network/nerd/index.test.tsx +++ b/__tests__/app/network/nerd/index.test.tsx @@ -48,12 +48,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/networkPages.test.tsx b/__tests__/app/networkPages.test.tsx index 8962fcab65..60270ae542 100644 --- a/__tests__/app/networkPages.test.tsx +++ b/__tests__/app/networkPages.test.tsx @@ -48,12 +48,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: () => mockSetTitle, useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/networkStats.test.tsx b/__tests__/app/networkStats.test.tsx index 2b5a6db46e..f17a592c9d 100644 --- a/__tests__/app/networkStats.test.tsx +++ b/__tests__/app/networkStats.test.tsx @@ -26,12 +26,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/nft-activity.test.tsx b/__tests__/app/nft-activity.test.tsx index 9f88d04e8e..0534f27c9e 100644 --- a/__tests__/app/nft-activity.test.tsx +++ b/__tests__/app/nft-activity.test.tsx @@ -11,12 +11,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/open-data/index.test.tsx b/__tests__/app/open-data/index.test.tsx index 84bcaf390f..9b6f1a04e5 100644 --- a/__tests__/app/open-data/index.test.tsx +++ b/__tests__/app/open-data/index.test.tsx @@ -11,12 +11,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/open-data/network-metrics.test.tsx b/__tests__/app/open-data/network-metrics.test.tsx index 85cadd6f40..d3b6dd9808 100644 --- a/__tests__/app/open-data/network-metrics.test.tsx +++ b/__tests__/app/open-data/network-metrics.test.tsx @@ -13,12 +13,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/open-data/rememes.test.tsx b/__tests__/app/open-data/rememes.test.tsx index 828849c363..6d2e9b4e40 100644 --- a/__tests__/app/open-data/rememes.test.tsx +++ b/__tests__/app/open-data/rememes.test.tsx @@ -13,12 +13,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/open-data/royalties.test.tsx b/__tests__/app/open-data/royalties.test.tsx index f524fd7b28..36fff24df5 100644 --- a/__tests__/app/open-data/royalties.test.tsx +++ b/__tests__/app/open-data/royalties.test.tsx @@ -13,12 +13,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/open-data/team.test.tsx b/__tests__/app/open-data/team.test.tsx index 697850e1fa..25789ea08a 100644 --- a/__tests__/app/open-data/team.test.tsx +++ b/__tests__/app/open-data/team.test.tsx @@ -10,12 +10,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/prenodesPage.test.tsx b/__tests__/app/prenodesPage.test.tsx index d58d3c6f13..411b4545de 100644 --- a/__tests__/app/prenodesPage.test.tsx +++ b/__tests__/app/prenodesPage.test.tsx @@ -14,12 +14,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: () => mockSetTitle, useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/rememes/contract-id.test.tsx b/__tests__/app/rememes/contract-id.test.tsx index 36aad3afac..f0546b56f1 100644 --- a/__tests__/app/rememes/contract-id.test.tsx +++ b/__tests__/app/rememes/contract-id.test.tsx @@ -35,12 +35,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/rememes/index.test.tsx b/__tests__/app/rememes/index.test.tsx index 45ff58c6e2..db5ac666e6 100644 --- a/__tests__/app/rememes/index.test.tsx +++ b/__tests__/app/rememes/index.test.tsx @@ -11,12 +11,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/restricted.test.tsx b/__tests__/app/restricted.test.tsx index 9e40ad40af..d0d34d489d 100644 --- a/__tests__/app/restricted.test.tsx +++ b/__tests__/app/restricted.test.tsx @@ -24,12 +24,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/the-memes/theMemesMint.test.tsx b/__tests__/app/the-memes/theMemesMint.test.tsx index d5ac8dd91f..f40f14ea4a 100644 --- a/__tests__/app/the-memes/theMemesMint.test.tsx +++ b/__tests__/app/the-memes/theMemesMint.test.tsx @@ -26,12 +26,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/tools/app-wallets/address.test.tsx b/__tests__/app/tools/app-wallets/address.test.tsx index 002075890a..4fdec175ca 100644 --- a/__tests__/app/tools/app-wallets/address.test.tsx +++ b/__tests__/app/tools/app-wallets/address.test.tsx @@ -17,12 +17,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/tools/app-wallets/import-wallet.test.tsx b/__tests__/app/tools/app-wallets/import-wallet.test.tsx index 044e62ea79..6250f20884 100644 --- a/__tests__/app/tools/app-wallets/import-wallet.test.tsx +++ b/__tests__/app/tools/app-wallets/import-wallet.test.tsx @@ -25,12 +25,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/tools/subscriptions-report.test.tsx b/__tests__/app/tools/subscriptions-report.test.tsx index e3f8fc11ab..3d7bc2d3f9 100644 --- a/__tests__/app/tools/subscriptions-report.test.tsx +++ b/__tests__/app/tools/subscriptions-report.test.tsx @@ -38,12 +38,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/app/wavesPage.test.tsx b/__tests__/app/wavesPage.test.tsx index eadb5495c9..11b162832f 100644 --- a/__tests__/app/wavesPage.test.tsx +++ b/__tests__/app/wavesPage.test.tsx @@ -18,12 +18,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/components/DistributionPlanToolWrapper.test.tsx b/__tests__/components/DistributionPlanToolWrapper.test.tsx index ec43381fe7..c8557ddd58 100644 --- a/__tests__/components/DistributionPlanToolWrapper.test.tsx +++ b/__tests__/components/DistributionPlanToolWrapper.test.tsx @@ -14,12 +14,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: () => mockSetTitle, useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/components/brain/my-stream/MyStreamWave.test.tsx b/__tests__/components/brain/my-stream/MyStreamWave.test.tsx index 1a876b8f1d..7409f7b728 100644 --- a/__tests__/components/brain/my-stream/MyStreamWave.test.tsx +++ b/__tests__/components/brain/my-stream/MyStreamWave.test.tsx @@ -77,12 +77,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }) => children, })); diff --git a/__tests__/components/brain/notifications/Notifications.test.tsx b/__tests__/components/brain/notifications/Notifications.test.tsx index d1603d2a09..90537b83b6 100644 --- a/__tests__/components/brain/notifications/Notifications.test.tsx +++ b/__tests__/components/brain/notifications/Notifications.test.tsx @@ -85,12 +85,10 @@ jest.mock('@/contexts/TitleContext', () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/components/distribution/Distribution.test.tsx b/__tests__/components/distribution/Distribution.test.tsx index b97135e865..dd5a0adcf1 100644 --- a/__tests__/components/distribution/Distribution.test.tsx +++ b/__tests__/components/distribution/Distribution.test.tsx @@ -20,7 +20,6 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), })); diff --git a/__tests__/components/header/HeaderActionButtons.test.tsx b/__tests__/components/header/HeaderActionButtons.test.tsx index e0b6c41951..8c6da1302b 100644 --- a/__tests__/components/header/HeaderActionButtons.test.tsx +++ b/__tests__/components/header/HeaderActionButtons.test.tsx @@ -33,7 +33,7 @@ describe("HeaderActionButtons", () => { }); it("creates new wave when active view is waves", async () => { - (useCtx as jest.Mock).mockReturnValue({ activeView: "waves", homeActiveTab: "latest" }); + (useCtx as jest.Mock).mockReturnValue({ activeView: "waves" }); const push = jest.fn(); const replace = jest.fn(); (useRt as jest.Mock).mockReturnValue({ push, replace }); @@ -44,7 +44,7 @@ describe("HeaderActionButtons", () => { it("creates new wave on app when active view is waves", async () => { (useDeviceInfo as jest.Mock).mockReturnValueOnce({ isApp: true }); - (useCtx as jest.Mock).mockReturnValue({ activeView: "waves", homeActiveTab: "latest" }); + (useCtx as jest.Mock).mockReturnValue({ activeView: "waves" }); const push = jest.fn(); (useRt as jest.Mock).mockReturnValue({ push, replace: jest.fn() }); render(); @@ -54,7 +54,7 @@ describe("HeaderActionButtons", () => { it("creates new dm when active view is messages", async () => { (usePn as jest.Mock).mockReturnValue("/messages"); - (useCtx as jest.Mock).mockReturnValue({ activeView: "messages", homeActiveTab: "latest" }); + (useCtx as jest.Mock).mockReturnValue({ activeView: "messages" }); const push = jest.fn(); const replace = jest.fn(); (useRt as jest.Mock).mockReturnValue({ push, replace }); @@ -66,7 +66,7 @@ describe("HeaderActionButtons", () => { it("creates new dm on app when active view is messages", async () => { (useDeviceInfo as jest.Mock).mockReturnValueOnce({ isApp: true }); (usePn as jest.Mock).mockReturnValue("/messages"); - (useCtx as jest.Mock).mockReturnValue({ activeView: "messages", homeActiveTab: "latest" }); + (useCtx as jest.Mock).mockReturnValue({ activeView: "messages" }); const push = jest.fn(); (useRt as jest.Mock).mockReturnValue({ push, replace: jest.fn() }); render(); @@ -76,7 +76,7 @@ describe("HeaderActionButtons", () => { it("renders nothing for other views", () => { (usePn as jest.Mock).mockReturnValue("/other"); - (useCtx as jest.Mock).mockReturnValue({ activeView: "other", homeActiveTab: "latest" }); + (useCtx as jest.Mock).mockReturnValue({ activeView: "other" }); (useRt as jest.Mock).mockReturnValue({ push: jest.fn(), replace: jest.fn() }); const { container } = render(); expect(container.firstChild).toBeNull(); diff --git a/__tests__/components/layout/AppLayout.test.tsx b/__tests__/components/layout/AppLayout.test.tsx index 70211b8311..01fb4ee8ca 100644 --- a/__tests__/components/layout/AppLayout.test.tsx +++ b/__tests__/components/layout/AppLayout.test.tsx @@ -75,7 +75,7 @@ describe("AppLayout", () => { }; it("renders main content when no active view", () => { - useViewContext.mockReturnValue({ activeView: null, homeActiveTab: 'latest' }); + useViewContext.mockReturnValue({ activeView: null }); renderWithProvider(child); expect(screen.getByTestId("header")).toBeInTheDocument(); expect(screen.getByText("child")).toBeInTheDocument(); @@ -83,11 +83,11 @@ describe("AppLayout", () => { }); it("renders waves or messages view based on activeView", () => { - useViewContext.mockReturnValue({ activeView: "waves", homeActiveTab: 'latest' }); + useViewContext.mockReturnValue({ activeView: "waves" }); const { rerender } = renderWithProvider(child); expect(screen.getByTestId("waves")).toBeInTheDocument(); - useViewContext.mockReturnValue({ activeView: "messages", homeActiveTab: 'latest' }); + useViewContext.mockReturnValue({ activeView: "messages" }); rerender( child diff --git a/__tests__/components/navigation/BottomNavigation.test.tsx b/__tests__/components/navigation/BottomNavigation.test.tsx index f71734c486..e51ef51933 100644 --- a/__tests__/components/navigation/BottomNavigation.test.tsx +++ b/__tests__/components/navigation/BottomNavigation.test.tsx @@ -37,10 +37,10 @@ describe('BottomNavigation', () => { const passedItems = navItemCalls.map((call) => call[0].item); expect(passedItems.map((item: { name: string }) => item.name)).toEqual([ - 'Home', + 'Discover', 'Waves', 'Messages', - 'Stream', + 'Home', 'Network', 'Collections', 'Notifications', diff --git a/__tests__/components/navigation/NavItem.test.tsx b/__tests__/components/navigation/NavItem.test.tsx index aabf1b0e0a..8af5c6d8a0 100644 --- a/__tests__/components/navigation/NavItem.test.tsx +++ b/__tests__/components/navigation/NavItem.test.tsx @@ -35,7 +35,6 @@ describe('NavItem notifications', () => { (useViewContext as jest.Mock).mockReturnValue({ activeView: 'home', handleNavClick, - homeActiveTab: 'latest', }); (useRouter as jest.Mock).mockReturnValue({ push: jest.fn() }); (useSearchParams as jest.Mock).mockReturnValue(new URLSearchParams()); @@ -44,7 +43,7 @@ describe('NavItem notifications', () => { (useUnreadIndicator as jest.Mock).mockReturnValue({ hasUnread: false }); (useNotificationsContext as jest.Mock).mockReturnValue({ removeAllDeliveredNotifications }); (useAuth as jest.Mock).mockReturnValue({ connectedProfile: { handle: 'user' } }); - (useTitle as jest.Mock).mockReturnValue({ setTitle, title: '6529.io', notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), setStreamHasNewItems: jest.fn() }); + (useTitle as jest.Mock).mockReturnValue({ setTitle, title: '6529.io', notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn() }); (useWaveData as jest.Mock).mockReturnValue({ data: null }); (useWave as jest.Mock).mockReturnValue({ isDm: false }); }); diff --git a/__tests__/components/navigation/ViewContext.test.tsx b/__tests__/components/navigation/ViewContext.test.tsx index 6a83b763b8..4305db28b3 100644 --- a/__tests__/components/navigation/ViewContext.test.tsx +++ b/__tests__/components/navigation/ViewContext.test.tsx @@ -80,22 +80,22 @@ describe("ViewContext", () => { expect(push).toHaveBeenCalledWith("/"); }); - it("navigates to feed tab when Stream is clicked", () => { + it("navigates to home (latest) when Home is clicked", () => { render( ); - expect(push).toHaveBeenCalledWith("/?tab=feed"); + expect(push).toHaveBeenCalledWith("/"); }); it("navigates to waves view when no last visited wave", () => { diff --git a/__tests__/components/navigation/isNavItemActive.test.ts b/__tests__/components/navigation/isNavItemActive.test.ts index dc34e45a9c..959a04a4ed 100644 --- a/__tests__/components/navigation/isNavItemActive.test.ts +++ b/__tests__/components/navigation/isNavItemActive.test.ts @@ -10,73 +10,41 @@ describe("isNavItemActive", () => { icon: "", } as any; expect( - isNavItemActive( - item, - "/network", - new URLSearchParams(), - null, - false, - "latest" - ) + isNavItemActive(item, "/network", new URLSearchParams(), null, false) ).toBe(true); }); - it("handles Stream route based on tab query", () => { + it("marks Home active on root with no overlay", () => { const item: NavItem = { kind: "route", - name: "Stream", + name: "Home", href: "/", icon: "", } as any; expect( - isNavItemActive( - item, - "/", - new URLSearchParams(), - null, - false, - "feed" - ) + isNavItemActive(item, "/", new URLSearchParams(), null, false) ).toBe(true); - expect( - isNavItemActive( - item, - "/", - new URLSearchParams(), - null, - false, - "latest" - ) - ).toBe(false); }); - it("marks Home active for latest tab", () => { + it("returns true for Discover item when on discover routes with no active view", () => { const item: NavItem = { kind: "route", - name: "Home", - href: "/", + name: "Discover", + href: "/discover", icon: "", } as any; expect( - isNavItemActive( - item, - "/", - new URLSearchParams(), - null, - false, - "latest" - ) + isNavItemActive(item, "/discover", new URLSearchParams(), null, false) ).toBe(true); expect( isNavItemActive( item, - "/", + "/discover/something", new URLSearchParams(), null, - false, - "feed" + false ) - ).toBe(false); + ).toBe(true); }); it("returns true for waves view when viewing non-DM wave sub route", () => { @@ -89,11 +57,10 @@ describe("isNavItemActive", () => { expect( isNavItemActive( item, - '/waves', - new URLSearchParams({ wave: 'x1' }), + "/waves", + new URLSearchParams({ wave: "x1" }), null, - false, - "latest" + false ) ).toBe(true); }); @@ -108,11 +75,10 @@ describe("isNavItemActive", () => { expect( isNavItemActive( item, - '/messages', - new URLSearchParams({ wave: 'dm1' }), + "/messages", + new URLSearchParams({ wave: "dm1" }), null, - true, - "latest" + true ) ).toBe(true); }); diff --git a/__tests__/components/the-memes/MemePage.test.tsx b/__tests__/components/the-memes/MemePage.test.tsx index 8e94ceda4b..c38caeb346 100644 --- a/__tests__/components/the-memes/MemePage.test.tsx +++ b/__tests__/components/the-memes/MemePage.test.tsx @@ -230,12 +230,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/contexts/navigationHistory.test.tsx b/__tests__/contexts/navigationHistory.test.tsx index f7b3019494..7a1b1317d1 100644 --- a/__tests__/contexts/navigationHistory.test.tsx +++ b/__tests__/contexts/navigationHistory.test.tsx @@ -25,7 +25,7 @@ const hardBack = jest.fn(); (useRouter as jest.Mock).mockReturnValue(routerMock); (usePathname as jest.Mock).mockReturnValue("/"); (useSearchParams as jest.Mock).mockReturnValue(new URLSearchParams()); -(useViewContext as jest.Mock).mockReturnValue({ hardBack, homeActiveTab: "latest" }); +(useViewContext as jest.Mock).mockReturnValue({ hardBack }); const wrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => ( {children} diff --git a/__tests__/moreStaticPages.test.tsx b/__tests__/moreStaticPages.test.tsx index 0cb31d6589..a473108547 100644 --- a/__tests__/moreStaticPages.test.tsx +++ b/__tests__/moreStaticPages.test.tsx @@ -67,12 +67,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/pages/miscPages2.test.tsx b/__tests__/pages/miscPages2.test.tsx index b8ce21a59c..627ee6a4a7 100644 --- a/__tests__/pages/miscPages2.test.tsx +++ b/__tests__/pages/miscPages2.test.tsx @@ -44,12 +44,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/pages/miscPages3.test.tsx b/__tests__/pages/miscPages3.test.tsx index 15d34c2062..22b62b2645 100644 --- a/__tests__/pages/miscPages3.test.tsx +++ b/__tests__/pages/miscPages3.test.tsx @@ -24,12 +24,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/pages/museumPages2.test.tsx b/__tests__/pages/museumPages2.test.tsx index 1cb792bb86..0a4decc56b 100644 --- a/__tests__/pages/museumPages2.test.tsx +++ b/__tests__/pages/museumPages2.test.tsx @@ -34,12 +34,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/pages/nextgenPages.test.tsx b/__tests__/pages/nextgenPages.test.tsx index d458a5b729..c67833b30d 100644 --- a/__tests__/pages/nextgenPages.test.tsx +++ b/__tests__/pages/nextgenPages.test.tsx @@ -78,12 +78,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: () => mockSetTitle, useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/pages/staticPages.test.tsx b/__tests__/pages/staticPages.test.tsx index 8d33d06560..0105226a58 100644 --- a/__tests__/pages/staticPages.test.tsx +++ b/__tests__/pages/staticPages.test.tsx @@ -49,12 +49,10 @@ jest.mock("@/contexts/TitleContext", () => ({ notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }), useSetTitle: jest.fn(), useSetNotificationCount: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: React.ReactNode }) => children, })); diff --git a/__tests__/utils/titleTestUtils.tsx b/__tests__/utils/titleTestUtils.tsx index 3d86bdd7b1..62faed409d 100644 --- a/__tests__/utils/titleTestUtils.tsx +++ b/__tests__/utils/titleTestUtils.tsx @@ -7,7 +7,6 @@ const mockTitleContext = { notificationCount: 0, setNotificationCount: jest.fn(), setWaveData: jest.fn(), - setStreamHasNewItems: jest.fn(), }; // Mock all TitleContext exports @@ -16,7 +15,6 @@ export const mockTitleContextModule = () => { useTitle: () => mockTitleContext, useSetTitle: jest.fn(), useSetWaveData: jest.fn(), - useSetStreamHasNewItems: jest.fn(), TitleProvider: ({ children }: { children: ReactNode }) => children, })); }; diff --git a/components/brain/BrainMobile.tsx b/components/brain/BrainMobile.tsx index ed413fe91e..462f1378ca 100644 --- a/components/brain/BrainMobile.tsx +++ b/components/brain/BrainMobile.tsx @@ -26,7 +26,7 @@ import BrainMobileWaves from "./mobile/BrainMobileWaves"; import BrainMobileMessages from "./mobile/BrainMobileMessages"; import useDeviceInfo from "@/hooks/useDeviceInfo"; import BrainNotifications from "./notifications/NotificationsContainer"; -import { getHomeFeedRoute } from "@/helpers/navigation.helpers"; +import { getHomeRoute } from "@/helpers/navigation.helpers"; import CreateWaveModal from "@/components/waves/create-wave/CreateWaveModal"; import CreateDirectMessageModal from "@/components/waves/create-dm/CreateDirectMessageModal"; import { useAuth } from "@/components/auth/Auth"; @@ -83,7 +83,7 @@ const BrainMobile: React.FC = ({ children }) => { params.delete('wave'); const newUrl = params.toString() ? `${pathname}?${params.toString()}` - : pathname || getHomeFeedRoute(); + : pathname || getHomeRoute(); router.push(newUrl, { scroll: false }); }, }); @@ -106,7 +106,7 @@ const BrainMobile: React.FC = ({ children }) => { params.delete('drop'); const newUrl = params.toString() ? `${pathname}?${params.toString()}` - : pathname || getHomeFeedRoute(); + : pathname || getHomeRoute(); router.push(newUrl, { scroll: false }); }; @@ -119,7 +119,6 @@ const BrainMobile: React.FC = ({ children }) => { const hasWave = Boolean(waveId); useEffect(() => { - const tabParam = searchParams?.get("tab"); const viewParam = searchParams?.get("view"); const createParam = searchParams?.get("create"); @@ -152,12 +151,7 @@ const BrainMobile: React.FC = ({ children }) => { return; } - if ( - pathname === "/" && - (!tabParam || tabParam === "feed") && - !waveId && - !viewParam - ) { + if (pathname === "/" && !waveId && !viewParam) { setActiveView(BrainView.DEFAULT); } }, [pathname, searchParams, waveId, isApp]); diff --git a/components/brain/my-stream/MyStreamWave.tsx b/components/brain/my-stream/MyStreamWave.tsx index 8a4bba3557..32d27f9ba1 100644 --- a/components/brain/my-stream/MyStreamWave.tsx +++ b/components/brain/my-stream/MyStreamWave.tsx @@ -16,7 +16,7 @@ import MyStreamWaveMyVotes from "./votes/MyStreamWaveMyVotes"; import MyStreamWaveFAQ from "./MyStreamWaveFAQ"; import { useMyStream } from "@/contexts/wave/MyStreamContext"; import { createBreakpoint } from "react-use"; -import { getHomeFeedRoute } from "@/helpers/navigation.helpers"; +import { getHomeRoute } from "@/helpers/navigation.helpers"; import { useWaveViewMode } from "@/hooks/useWaveViewMode"; import { useWave } from "@/hooks/useWave"; @@ -41,7 +41,7 @@ const MyStreamWave: React.FC = ({ waveId }) => { params.delete("wave"); const newUrl = params.toString() ? `${pathname}?${params.toString()}` - : pathname || getHomeFeedRoute(); + : pathname || getHomeRoute(); router.push(newUrl, { scroll: false }); }, }); diff --git a/components/brain/my-stream/MyStreamWaveChat.tsx b/components/brain/my-stream/MyStreamWaveChat.tsx index 9104bdef85..abc9fc1130 100644 --- a/components/brain/my-stream/MyStreamWaveChat.tsx +++ b/components/brain/my-stream/MyStreamWaveChat.tsx @@ -10,7 +10,7 @@ import PrivilegedDropCreator, { import { UnreadDividerProvider } from "@/contexts/wave/UnreadDividerContext"; import type { ApiDrop } from "@/generated/models/ApiDrop"; import type { ApiWave } from "@/generated/models/ApiWave"; -import { getHomeFeedRoute } from "@/helpers/navigation.helpers"; +import { getHomeRoute } from "@/helpers/navigation.helpers"; import type { ExtendedDrop } from "@/helpers/waves/drop.helpers"; import useDeviceInfo from "@/hooks/useDeviceInfo"; import { useWave } from "@/hooks/useWave"; @@ -148,7 +148,7 @@ const MyStreamWaveChat: React.FC = ({ params.delete("divider"); const href = params.toString() ? `${pathname}?${params.toString()}` - : pathname || getHomeFeedRoute(); + : pathname || getHomeRoute(); router.replace(href, { scroll: false }); }, [initialDropState, searchParams, router, pathname]); diff --git a/components/brain/my-stream/layout/LayoutContext.tsx b/components/brain/my-stream/layout/LayoutContext.tsx index 3651779dff..d5c4e59e21 100644 --- a/components/brain/my-stream/layout/LayoutContext.tsx +++ b/components/brain/my-stream/layout/LayoutContext.tsx @@ -107,10 +107,10 @@ interface LayoutContextType { // Style for feed view myStreamFeedStyle: React.CSSProperties; - // Style for homepage feed view (excludes header/breadcrumbs, includes tabs) + // Style for homepage view (excludes header/breadcrumbs, includes tabs) homepageFeedStyle: React.CSSProperties; - // Style for small screen layout feed (includes header and tabs) + // Style for small screen layout (includes header and tabs) smallScreenFeedStyle: React.CSSProperties; // Style for mobile waves view diff --git a/components/brain/notifications/hooks/useNotificationsController.ts b/components/brain/notifications/hooks/useNotificationsController.ts index 42763fa485..c18c3b0a3e 100644 --- a/components/brain/notifications/hooks/useNotificationsController.ts +++ b/components/brain/notifications/hooks/useNotificationsController.ts @@ -166,7 +166,7 @@ export const useNotificationsController = params.delete("reload"); const newUrl = params.toString() ? `${pathname}?${params.toString()}` - : pathname || "/my-stream/notifications"; + : pathname || "/notifications"; router.replace(newUrl, { scroll: false }); }; diff --git a/components/footer/FooterWrapper.tsx b/components/footer/FooterWrapper.tsx index 8836a97094..6635e56a0b 100644 --- a/components/footer/FooterWrapper.tsx +++ b/components/footer/FooterWrapper.tsx @@ -1,62 +1,15 @@ "use client"; import Footer from "@/components/footer/Footer"; -import { - HOME_TAB_EVENT, - getStoredHomeTab, - type HomeTab, -} from "@/components/home/useHomeTabs"; import { usePathname } from "next/navigation"; -import { useEffect, useState } from "react"; import useDeviceInfo from "../../hooks/useDeviceInfo"; -const HOME_TAB_QUERY_PARAM = "tab"; - -const isHomeTab = (value: unknown): value is HomeTab => - value === "feed" || value === "latest"; - export default function FooterWrapper() { const { isApp } = useDeviceInfo(); const pathname = usePathname(); - const [homeActiveTab, setHomeActiveTab] = useState(() => - getStoredHomeTab() - ); - useEffect(() => { - const win = ( - globalThis as typeof globalThis & { window?: Window | undefined } - ).window; - if (win === undefined) { - return; - } - - const params = new URLSearchParams(win.location?.search ?? ""); - const tabFromQuery = params.get(HOME_TAB_QUERY_PARAM); - const nextTab = isHomeTab(tabFromQuery) ? tabFromQuery : getStoredHomeTab(); - setHomeActiveTab((current) => (current === nextTab ? current : nextTab)); - - const handleTabChange = ( - event: CustomEvent<{ tab?: HomeTab | undefined }> - ) => { - const detail = event.detail; - if (!detail?.tab || !isHomeTab(detail.tab)) { - return; - } - setHomeActiveTab(detail.tab); - }; - - win.addEventListener(HOME_TAB_EVENT, handleTabChange as EventListener); - - return () => { - win.removeEventListener(HOME_TAB_EVENT, handleTabChange as EventListener); - }; - }, []); - - const homeFeedTabActive = pathname === "/" && homeActiveTab === "feed"; const myFeedRoutes = ["/my-feed", "/feed"]; - const hideFooter = isApp || - homeFeedTabActive || myFeedRoutes.some((path) => pathname?.startsWith(path)) || ["/waves", "/messages", "/notifications", "/open-mobile"].some((path) => pathname?.startsWith(path) diff --git a/components/home/useHomeTabs.ts b/components/home/useHomeTabs.ts deleted file mode 100644 index 1ca61ce315..0000000000 --- a/components/home/useHomeTabs.ts +++ /dev/null @@ -1,58 +0,0 @@ -"use client"; - -type HomeTab = "feed" | "latest"; - -const HOME_TAB_STORAGE_KEY = "home.activeTab"; -export const HOME_TAB_EVENT = "homeTabChange"; - -const getBrowserWindow = () => { - const { window: browserWindow } = globalThis as typeof globalThis & { - window?: Window | undefined; - }; - return browserWindow; -}; - -export const getStoredHomeTab = (): HomeTab => { - const browserWindow = getBrowserWindow(); - if (browserWindow === undefined) { - return "latest"; - } - - try { - const saved = browserWindow.localStorage.getItem(HOME_TAB_STORAGE_KEY); - return saved === "feed" || saved === "latest" ? saved : "latest"; - } catch (error) { - console.warn("Failed to read home tab from storage", error); - return "latest"; - } -}; - -export const setStoredHomeTab = (tab: HomeTab) => { - const browserWindow = getBrowserWindow(); - if (browserWindow === undefined) { - return; - } - - try { - const current = browserWindow.localStorage.getItem(HOME_TAB_STORAGE_KEY); - if (current === tab) { - browserWindow.dispatchEvent( - new CustomEvent(HOME_TAB_EVENT, { - detail: { tab }, - }) - ); - return; - } - - browserWindow.localStorage.setItem(HOME_TAB_STORAGE_KEY, tab); - browserWindow.dispatchEvent( - new CustomEvent(HOME_TAB_EVENT, { - detail: { tab }, - }) - ); - } catch (error) { - console.warn("Failed to persist home tab to storage", error); - } -}; - -export type { HomeTab }; diff --git a/components/layout/AppLayout.tsx b/components/layout/AppLayout.tsx index 9f16fd59d0..c936513335 100644 --- a/components/layout/AppLayout.tsx +++ b/components/layout/AppLayout.tsx @@ -33,7 +33,7 @@ export default function AppLayout({ children }: Props) { const { registerRef } = useLayout(); const { setHeaderRef } = useHeaderContext(); const headerRef = useRef(null); - const { activeView, homeActiveTab } = useViewContext(); + const { activeView } = useViewContext(); const pathname = usePathname(); const searchParams = useSearchParams(); const isSingleDropOpen = searchParams?.get("drop") !== null; @@ -47,7 +47,6 @@ export default function AppLayout({ children }: Props) { pathname === "/messages" || pathname === "/notifications" || (pathname === "/" && (hasWaveParam || isViewingWavesOrMessages)); - const isHomeFeedView = pathname === "/" && homeActiveTab === "feed"; const editingDropId = useSelector(selectEditingDropId); const { isApp } = useDeviceInfo(); const { isVisible: isAndroidKeyboardVisible, isAndroid } = @@ -78,7 +77,7 @@ export default function AppLayout({ children }: Props) { return (
@@ -92,7 +91,7 @@ export default function AppLayout({ children }: Props) { ) : (
{children}
)} - {!isSingleDropOpen && !isStreamRoute && !isHomeFeedView && ( + {!isSingleDropOpen && !isStreamRoute && (
)} {!isSingleDropOpen && !isEditingOnMobile && ( diff --git a/components/layout/SmallScreenLayout.tsx b/components/layout/SmallScreenLayout.tsx index dcba5c6e28..d24a2ffdca 100644 --- a/components/layout/SmallScreenLayout.tsx +++ b/components/layout/SmallScreenLayout.tsx @@ -1,8 +1,7 @@ "use client"; import { useHeaderContext } from "@/contexts/HeaderContext"; -import { useSearchParams } from "next/navigation"; -import type { ReactNode} from "react"; +import type { ReactNode } from "react"; import { useCallback, useEffect, useRef, useState } from "react"; import { SIDEBAR_WIDTHS } from "../../constants/sidebar"; import { SidebarProvider } from "../../hooks/useSidebarState"; @@ -20,9 +19,6 @@ export default function SmallScreenLayout({ children }: Props) { const { setHeaderRef } = useHeaderContext(); const containerRef = useRef(null); - const searchParams = useSearchParams(); - const activeTab = searchParams?.get("tab") || "latest"; - const headerWrapperRef = useCallback( (node: HTMLDivElement | null) => { registerRef("header", node); @@ -38,15 +34,6 @@ export default function SmallScreenLayout({ children }: Props) { }; }, [registerRef, setHeaderRef]); - useEffect(() => { - const container = containerRef.current; - if (container && activeTab) { - requestAnimationFrame(() => { - container.scrollTop = 0; - }); - } - }, [activeTab]); - const toggleMenu = useCallback(() => { setIsMenuOpen((prev) => !prev); }, []); @@ -59,9 +46,7 @@ export default function SmallScreenLayout({ children }: Props) {
+ className="tw-bg-black tw-overflow-auto">
= ({ hidden = false }) =
  • diff --git a/components/navigation/NavItem.tsx b/components/navigation/NavItem.tsx index 371c3d2c7f..8ea4812c32 100644 --- a/components/navigation/NavItem.tsx +++ b/components/navigation/NavItem.tsx @@ -22,12 +22,12 @@ interface Props { const NavItem = ({ item }: Props) => { const pathname = usePathname(); const searchParams = useSearchParams(); - const { activeView, handleNavClick, homeActiveTab } = useViewContext(); + const { activeView, handleNavClick } = useViewContext(); const { name } = item; const { icon } = item; - const isStream = name === "Stream"; + const isLogoItem = name === "Home"; // Determine if the current wave (if any) is a DM const waveIdFromQuery = @@ -106,8 +106,7 @@ const NavItem = ({ item }: Props) => { pathname ?? "", searchParams ?? new URLSearchParams(), activeView, - isCurrentWaveDmValue, - homeActiveTab ?? "latest" + isCurrentWaveDmValue ); return ( @@ -123,7 +122,7 @@ const NavItem = ({ item }: Props) => { )} diff --git a/components/navigation/ViewContext.tsx b/components/navigation/ViewContext.tsx index 07d05c5bbb..b36f0ed98d 100644 --- a/components/navigation/ViewContext.tsx +++ b/components/navigation/ViewContext.tsx @@ -16,24 +16,16 @@ import type { ApiWave } from "@/generated/models/ApiWave"; import { useSearchParams, useRouter } from "next/navigation"; import useDeviceInfo from "@/hooks/useDeviceInfo"; import { - getHomeFeedRoute, - getHomeLatestRoute, + getHomeRoute, getMessagesBaseRoute, getWaveRoute, getWavesBaseRoute, } from "@/helpers/navigation.helpers"; -import type { HomeTab } from "@/components/home/useHomeTabs"; -import { - HOME_TAB_EVENT, - getStoredHomeTab, - setStoredHomeTab, -} from "@/components/home/useHomeTabs"; interface ViewContextType { activeView: ViewKey | null; hardBack: (v: ViewKey) => void; handleNavClick: (item: NavItem) => void; - homeActiveTab: HomeTab; clearLastVisited: (type: "wave" | "dm") => void; } @@ -47,14 +39,10 @@ export const ViewProvider: React.FC<{ readonly children: ReactNode }> = ({ const { isApp } = useDeviceInfo(); const [lastVisitedWave, setLastVisitedWave] = useState(null); const [lastVisitedDm, setLastVisitedDm] = useState(null); - const [homeActiveTab, setHomeActiveTab] = useState(() => - getStoredHomeTab() - ); const waveParam = searchParams.get("wave"); const viewParam = searchParams.get("view"); const lastFetchedWaveIdRef = useRef(null); - // Derived state: activeView is computed from URL params, not stored in state const activeView = useMemo(() => { if (waveParam) { return null; @@ -62,32 +50,6 @@ export const ViewProvider: React.FC<{ readonly children: ReactNode }> = ({ return viewParam ? (viewParam as ViewKey) : null; }, [waveParam, viewParam]); - useEffect(() => { - const { window: browserWindow } = globalThis as typeof globalThis & { - window?: Window | undefined; - }; - - const handleTabEvent = (event: Event) => { - const detail = (event as CustomEvent<{ tab?: HomeTab | undefined }>) - .detail; - const tab = detail.tab; - if (tab !== "feed" && tab !== "latest") return; - setHomeActiveTab(tab); - }; - - browserWindow.addEventListener( - HOME_TAB_EVENT, - handleTabEvent as EventListener - ); - - return () => { - browserWindow.removeEventListener( - HOME_TAB_EVENT, - handleTabEvent as EventListener - ); - }; - }, []); - const fetchWaveDetails = useCallback((targetWaveId: string) => { commonApiFetch({ endpoint: `/waves/${targetWaveId}`, @@ -119,18 +81,8 @@ export const ViewProvider: React.FC<{ readonly children: ReactNode }> = ({ const handleNavClick = useCallback( (item: NavItem) => { if (item.kind === "route") { - if (item.name === "Stream") { - // activeView will become null automatically when URL changes (no wave/view params) - setLastVisitedWave(null); - setLastVisitedDm(null); - setHomeActiveTab("feed"); - setStoredHomeTab("feed"); - router.push(getHomeFeedRoute()); - } else if (item.name === "Home") { - // activeView will become null automatically when URL changes - setHomeActiveTab("latest"); - setStoredHomeTab("latest"); - router.push(getHomeLatestRoute()); + if (item.name === "Home") { + router.push(getHomeRoute()); } else { router.push(item.href); } @@ -201,10 +153,9 @@ export const ViewProvider: React.FC<{ readonly children: ReactNode }> = ({ activeView, handleNavClick, hardBack, - homeActiveTab, clearLastVisited, }), - [activeView, handleNavClick, hardBack, homeActiveTab, clearLastVisited] + [activeView, handleNavClick, hardBack, clearLastVisited] ); return ( diff --git a/components/navigation/isNavItemActive.ts b/components/navigation/isNavItemActive.ts index af2f751fc3..f8d96c82ab 100644 --- a/components/navigation/isNavItemActive.ts +++ b/components/navigation/isNavItemActive.ts @@ -1,4 +1,3 @@ -import type { HomeTab } from "@/components/home/useHomeTabs"; import type { NavItem as NavItemData, ViewKey } from "./navTypes"; export const isNavItemActive = ( @@ -6,10 +5,8 @@ export const isNavItemActive = ( pathname: string, searchParams: URLSearchParams, activeView: ViewKey | null, - isCurrentWaveDm: boolean, - homeActiveTab: HomeTab + isCurrentWaveDm: boolean ): boolean => { - // User profile pages and Network routes are active only when no in-app view is selected if (item.name === "Network" && activeView === null) { // Profile pages (/[user]) if (pathname.startsWith("/[user]")) { @@ -43,29 +40,25 @@ export const isNavItemActive = ( const hasWaveParam = typeof waveParam === "string"; const isWavesPath = pathname === "/waves"; const isMessagesPath = pathname === "/messages"; - const tabParam = searchParams?.get("tab"); - const isFeedTab = homeActiveTab === "feed"; - const isHomeFeedPath = pathname === "/" && (tabParam === "feed" || isFeedTab); const isWaveSubRoute = - hasWaveParam && (isHomeFeedPath || isWavesPath || isMessagesPath); + hasWaveParam && (isWavesPath || isMessagesPath); const viewParam = searchParams?.get("view"); const isWavesView = pathname === "/waves" || viewParam === "waves"; const isMessagesView = pathname === "/messages" || viewParam === "messages"; if (item.kind === "route") { - if (item.name === "Stream") { - return isHomeFeedPath && activeView === null; - } if (item.name === "Home") { return ( pathname === "/" && activeView === null && - !isFeedTab && !hasWaveParam && !isWavesView && !isMessagesView ); } + if (item.name === "Discover") { + return (pathname === "/discover" || pathname.startsWith("/discover/")) && activeView === null; + } return pathname === item.href && activeView === null; } diff --git a/contexts/TitleContext.tsx b/contexts/TitleContext.tsx index f538b7ef1f..16cf2d4f0e 100644 --- a/contexts/TitleContext.tsx +++ b/contexts/TitleContext.tsx @@ -18,7 +18,6 @@ type TitleContextType = { notificationCount: number; setNotificationCount: (count: number) => void; setWaveData: (data: { name: string; newItemsCount: number } | null) => void; - setStreamHasNewItems: (hasNewItems: boolean) => void; }; const TitleContext = createContext(undefined); @@ -80,17 +79,14 @@ export const TitleProvider: React.FC<{ children: React.ReactNode }> = ({ name: string; newItemsCount: number; } | null>(null); - const [streamHasNewItems, setStreamHasNewItems] = useState(false); const routeRef = useRef(pathname); const queryRef = useRef(searchParams); - const tabParam = searchParams?.get("tab"); const waveParam = myStream?.activeWave.id ?? searchParams?.get("wave") ?? null; const isWaveRoute = pathname?.startsWith("/waves") || pathname?.startsWith("/messages") || (pathname === "/" && searchParams?.get("view") === "waves"); - const isHomeFeedTab = pathname === "/" && tabParam === "feed"; useEffect(() => { if (routeRef.current === pathname) { @@ -101,30 +97,15 @@ export const TitleProvider: React.FC<{ children: React.ReactNode }> = ({ setTitle(defaultTitle); }, [pathname]); - // Update title when route or query changes useEffect(() => { - const pathChanged = routeRef.current !== pathname; - const queryChanged = - queryRef.current?.toString() !== searchParams?.toString(); - - if (pathChanged) { + if (routeRef.current !== pathname) { routeRef.current = pathname; queryRef.current = searchParams; const defaultTitle = getDefaultTitleForRoute(pathname); setTitle(defaultTitle); - // Reset wave data when leaving the home feed tab - if (!isHomeFeedTab) { - setWaveData(null); - setStreamHasNewItems(false); - } - } else if (queryChanged && isHomeFeedTab) { - queryRef.current = searchParams; - // Reset wave data when navigating between waves or back to stream - if (!waveParam) { - setWaveData(null); - } + setWaveData(null); } - }, [pathname, searchParams, isHomeFeedTab, waveParam]); + }, [pathname, searchParams]); const updateTitle = (newTitle: string) => { if (routeRef.current === pathname) { @@ -145,30 +126,12 @@ export const TitleProvider: React.FC<{ children: React.ReactNode }> = ({ return `${newItemsText}${waveData.name} | Brain`; })(); - if (isHomeFeedTab) { - if (waveTitle) return waveTitle; - - const prefix = - streamHasNewItems && notificationCount === 0 - ? "(New messages) My Stream" - : "My Stream"; - return `${prefix} | Brain`; - } - if (isWaveRoute && waveTitle) { return waveTitle; } return title; - }, [ - isHomeFeedTab, - isWaveRoute, - waveParam, - waveData, - streamHasNewItems, - title, - notificationCount, - ]); + }, [isWaveRoute, waveParam, waveData, title, notificationCount]); // Memoize the context value to prevent unnecessary re-renders const contextValue = useMemo(() => { @@ -187,7 +150,6 @@ export const TitleProvider: React.FC<{ children: React.ReactNode }> = ({ notificationCount, setNotificationCount, setWaveData, - setStreamHasNewItems, }; }, [computedTitle, notificationCount]); diff --git a/helpers/navigation.helpers.ts b/helpers/navigation.helpers.ts index e49977bb4f..b7215122c5 100644 --- a/helpers/navigation.helpers.ts +++ b/helpers/navigation.helpers.ts @@ -6,9 +6,7 @@ export const mainSegment = (url: string): string => { export const sameMainPath = (a: string, b: string): boolean => mainSegment(a) === mainSegment(b); -export const getHomeLatestRoute = (): string => "/"; - -export const getHomeFeedRoute = (): string => "/?tab=feed"; +export const getHomeRoute = (): string => "/"; export const getWavesBaseRoute = (_isApp: boolean): string => "/waves"; diff --git a/proxy.ts b/proxy.ts index e72d2fc662..85e044b9bc 100644 --- a/proxy.ts +++ b/proxy.ts @@ -1,5 +1,5 @@ import { - getHomeFeedRoute, + getHomeRoute, getMessagesBaseRoute, getNotificationsRoute, getWaveRoute, @@ -200,7 +200,7 @@ function resolveMyStreamHomeRedirect({ return `${getWavesBaseRoute(false)}?${params.toString()}`; } - return getHomeFeedRoute(); + return getHomeRoute(); } function resolveMyStreamRedirect(