Skip to content
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

Remove UA #1965

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import { GAVersion, Url } from "../../constants"
import Spinner from "../Spinner"
import { linkData } from "./links"
import GA4Toggle from "./GA4Toggle"

Check warning on line 44 in src/components/Layout/index.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

'GA4Toggle' is defined but never used
import BugReport from "./BugReport"
import Loadable from "../Loadable"
import useLogin2, { UserStatus } from "./useLogin"
Expand Down Expand Up @@ -118,7 +118,7 @@
user,
}) => {
usePageView(title)
const { gaVersion, setGAVersion } = useGAVersion(pathname)

Check warning on line 121 in src/components/Layout/index.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

'setGAVersion' is assigned a value but never used

const [open, setOpen] = React.useState(false)

Expand Down Expand Up @@ -204,16 +204,6 @@
</Typography>
)
}
if (linkData.type === "ga4toggle") {
return (
<li key={linkData.type} className={classes.innerNav}>
<GA4Toggle
setGAVersion={setGAVersion}
gaVersion={gaVersion}
/>
</li>
)
}
return (
<ListItem
button
Expand Down Expand Up @@ -255,16 +245,6 @@
</li>
)
}
if (linkData.type === "ga4toggle") {
return (
<li key={linkData.type} className={classes.innerNav}>
<GA4Toggle
setGAVersion={setGAVersion}
gaVersion={gaVersion}
/>
</li>
)
}
return (
<li key={linkData.text}>
<Link
Expand Down
10 changes: 1 addition & 9 deletions src/components/Layout/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ interface LinkT {
href: string
}

interface ToggleT {
type: "ga4toggle"
versions: GAVersion[]
}
export type LinkData = LinkT | Heading | ToggleT
export type LinkData = LinkT | Heading

// TODO - Add an enum for the slugs so they aren't magic strings.
export const linkData: LinkData[] = [
Expand All @@ -26,10 +22,6 @@ export const linkData: LinkData[] = [
type: "heading",
versions: [GAVersion.GoogleAnalytics4, GAVersion.UniversalAnalytics],
},
{
type: "ga4toggle",
versions: [GAVersion.GoogleAnalytics4, GAVersion.UniversalAnalytics],
},
{
text: "Account Explorer",
href: "/account-explorer/",
Expand Down
Loading