-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💰 Add new revenue page in staff tools (#yoginth/eng-116-add-new-reven…
…ue-page-in-staff-tools) Summary: Added a new revenue page in staff tools, displaying NFT, Pro, and Signup revenue stats. Highlights: • Created `NftRevenue`, `ProRevenue`, and `SignupRevenue` components to fetch and display respective revenue data. • Added a new route `/staff/revenue` and updated `StaffSidebar` to include a link to the revenue page. • Removed revenue components from `Stats` page, consolidating them in the new revenue page. Read more: https://pierre.co/hey/hey/yoginth/eng-116-add-new-revenue-page-in-staff-tools
- Loading branch information
Yoginth
authored and
Pierre
committed
Sep 29, 2024
1 parent
aadd828
commit b521a60
Showing
7 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import MetaTags from "@components/Common/MetaTags"; | ||
import { Leafwatch } from "@helpers/leafwatch"; | ||
import { APP_NAME } from "@hey/data/constants"; | ||
import { FeatureFlag } from "@hey/data/feature-flags"; | ||
import { PAGEVIEW } from "@hey/data/tracking"; | ||
import { GridItemEight, GridItemFour, GridLayout } from "@hey/ui"; | ||
import { useFlag } from "@unleash/proxy-client-react"; | ||
import type { NextPage } from "next"; | ||
import { useEffect } from "react"; | ||
import Custom404 from "src/pages/404"; | ||
import { useProfileStore } from "src/store/persisted/useProfileStore"; | ||
import StaffSidebar from "../Sidebar"; | ||
import NftRevenue from "./NftRevenue"; | ||
import ProRevenue from "./ProRevenue"; | ||
import SignupRevenue from "./SignupRevenue"; | ||
|
||
const Revenue: NextPage = () => { | ||
const { currentProfile } = useProfileStore(); | ||
const isStaff = useFlag(FeatureFlag.Staff); | ||
|
||
useEffect(() => { | ||
Leafwatch.track(PAGEVIEW, { page: "staff-tools", subpage: "revenue" }); | ||
}, []); | ||
|
||
if (!currentProfile || !isStaff) { | ||
return <Custom404 />; | ||
} | ||
|
||
return ( | ||
<GridLayout> | ||
<MetaTags title={`Staff Tools • Revenue • ${APP_NAME}`} /> | ||
<GridItemFour> | ||
<StaffSidebar /> | ||
</GridItemFour> | ||
<GridItemEight className="space-y-5"> | ||
<ProRevenue /> | ||
<SignupRevenue /> | ||
<NftRevenue /> | ||
</GridItemEight> | ||
</GridLayout> | ||
); | ||
}; | ||
|
||
export default Revenue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Revenue from "@components/Staff/Revenue"; | ||
|
||
export default Revenue; |