-
-
Notifications
You must be signed in to change notification settings - Fork 666
Mobile/App Platform Support #921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b0caa07
9eb5eb0
5c81b20
5b8249b
ed6cfc3
07c1cf5
c774bbd
1767d6c
4ac1a85
d7c4f0e
e920af7
4cd17d9
cab37a0
94b7f0e
62bfbf3
ac84e2f
dbbdd4a
f607f47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ function SidebarContent() { | |
| const embed = useEmbedablePage(); | ||
|
|
||
| const { data: site } = useGetSite(Number(pathname.split("/")[1])); | ||
| const isApp = site?.type === "app"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevent app/web nav flicker before site type resolves. At Line 39, 💡 Suggested patch- const { data: site } = useGetSite(Number(pathname.split("/")[1]));
+ const { data: site, isLoading: isSiteLoading } = useGetSite(Number(pathname.split("/")[1]));
const isApp = site?.type === "app";
@@
- <SidebarComponents.SectionHeader>{isApp ? t("Analytics") : t("Web Analytics")}</SidebarComponents.SectionHeader>
+ <SidebarComponents.SectionHeader>
+ {isSiteLoading ? t("Analytics") : isApp ? t("Analytics") : t("Web Analytics")}
+ </SidebarComponents.SectionHeader>
@@
- {IS_CLOUD && !isApp && (
+ {IS_CLOUD && !isSiteLoading && !isApp && (
@@
- {!isApp && (
+ {!isSiteLoading && !isApp && (🤖 Prompt for AI Agents |
||
|
|
||
| // Check which tab is active based on the current path | ||
| const getTabPath = (tabName: string) => { | ||
|
|
@@ -70,7 +71,7 @@ function SidebarContent() { | |
| <SiteSelector /> | ||
| </div> | ||
| <div className="flex flex-col p-3 pt-1"> | ||
| <SidebarComponents.SectionHeader>{t("Web Analytics")}</SidebarComponents.SectionHeader> | ||
| <SidebarComponents.SectionHeader>{isApp ? t("Analytics") : t("Web Analytics")}</SidebarComponents.SectionHeader> | ||
| <SidebarComponents.Item | ||
| label={t("Main")} | ||
| active={isActiveTab("main")} | ||
|
|
@@ -85,13 +86,13 @@ function SidebarContent() { | |
| /> | ||
| {IS_CLOUD && ( | ||
| <SidebarComponents.Item | ||
| label={t("Pages")} | ||
| label={isApp ? t("Screens") : t("Pages")} | ||
| active={isActiveTab("pages")} | ||
| href={getTabPath("pages")} | ||
| icon={<File className="w-4 h-4" />} | ||
| /> | ||
| )} | ||
| {IS_CLOUD && ( | ||
| {IS_CLOUD && !isApp && ( | ||
| <SidebarComponents.Item | ||
| label={t("Performance")} | ||
| active={isActiveTab("performance")} | ||
|
|
@@ -114,16 +115,18 @@ function SidebarContent() { | |
| /> | ||
| </div> | ||
| <SidebarComponents.SectionHeader>{t("Product Analytics")}</SidebarComponents.SectionHeader> | ||
| <div className="hidden md:block"> | ||
| {!subscription?.planName?.startsWith("appsumo") && !isSubscriptionLoading && ( | ||
| <SidebarComponents.Item | ||
| label={t("Replay")} | ||
| active={isActiveTab("replay")} | ||
| href={getTabPath("replay")} | ||
| icon={<Video className="w-4 h-4" />} | ||
| /> | ||
| )} | ||
| </div> | ||
| {!isApp && ( | ||
| <div className="hidden md:block"> | ||
| {!subscription?.planName?.startsWith("appsumo") && !isSubscriptionLoading && ( | ||
| <SidebarComponents.Item | ||
| label={t("Replay")} | ||
| active={isActiveTab("replay")} | ||
| href={getTabPath("replay")} | ||
| icon={<Video className="w-4 h-4" />} | ||
| /> | ||
| )} | ||
| </div> | ||
| )} | ||
| <SidebarComponents.Item | ||
| label={t("Funnels")} | ||
| active={isActiveTab("funnels")} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.