Skip to content
Merged
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
39 changes: 0 additions & 39 deletions src/components/Layout/GA4Toggle.tsx

This file was deleted.

8 changes: 6 additions & 2 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import { GAVersion, Url } from "../../constants"
import Spinner from "../Spinner"
import { linkData } from "./links"
import GA4Toggle from "./GA4Toggle"
import BugReport from "./BugReport"
import Loadable from "../Loadable"
import useLogin2, { UserStatus } from "./useLogin"
Expand Down Expand Up @@ -118,7 +117,7 @@
user,
}) => {
usePageView(title)
const { gaVersion, setGAVersion } = useGAVersion(pathname)

Check warning on line 120 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 All @@ -130,7 +129,12 @@
const newLocation = window.location.href.replace( window.location.hostname, newHostname );
window.location.replace(newLocation);
}
//}, 1000);

if( !window.location.search && window.location.pathname === '/' ) {
const newLocation = window.location.pathname = '/ga4/';
window.location.replace(newLocation);
}
//}, 1000);

return;
}, []);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react"
import { styled } from '@mui/material/styles';
import { useTheme } from "@mui/material"
import {Circles} from "react-loader-spinner"
import { Circles } from 'react-loader-spinner'
import {PropsWithChildren} from 'react';

const PREFIX = 'Spinner';
Expand Down
Loading