Skip to content

Commit 1c7e966

Browse files
committed
Hide v2 tab only in analytics not in pools
1 parent 172bdd9 commit 1c7e966

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/Toggle/VersionToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const VersionToggle: React.FC = () => {
3535
: 'v3';
3636

3737
// Hide v2 and total tab for now
38-
const hideV2 = true; // TODO: false to show v2
38+
const hideV2 = isAnalyticsPage; // TODO: false to show v2. Set to false if isAnalyticsPage is true
3939
const hideTotal = true; // TODO: false to show total
4040

4141
useEffect(() => {

src/hooks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const useAnalyticsVersion = () => {
134134
const v2 = config['v2'];
135135
const v3 = config['v3'];
136136
// const defaultVersion = v2 && v3 ? 'total' : v2 ? 'v2' : 'v3';
137-
const defaultVersion = 'v3'; // default to v3 for now
137+
const defaultVersion = v2 && v3 ? 'v3' : v2 ? 'v2' : 'v3'; // default to v3 for now
138138
const params: any = useParams();
139139
const version = params && params.version ? params.version : defaultVersion;
140140
return version;

0 commit comments

Comments
 (0)