Skip to content

Commit bfa84e5

Browse files
authored
refactor(web): hide GA settings on project [VIZ-1722] (#1638)
1 parent 83a2929 commit bfa84e5

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed

web/src/beta/features/ProjectSettings/innerPages/PublicSettings/PublicSettingsDetail.tsx

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ const PublicSettingsDetail: React.FC<Props> = ({
9999
trackingId: settingsItem.trackingId
100100
});
101101

102+
//TODO: Removed after investigation
103+
const hideGASettings = true;
104+
102105
const handleSubmitGA = useCallback(() => {
103106
if (onUpdateGA) {
104107
onUpdateGA({
@@ -308,28 +311,30 @@ const PublicSettingsDetail: React.FC<Props> = ({
308311
</>
309312
)}
310313
</SettingsFields>
311-
<SettingsFields>
312-
<TitleWrapper size="body" weight="bold">
313-
{t("Google Analytics")}
314-
</TitleWrapper>
315-
<SwitchField
316-
title={t("Enable Google Analytics")}
317-
value={localGA.enableGa ?? false}
318-
onChange={(enableGa: boolean) => {
319-
setLocalGA((s) => ({ ...s, enableGa }));
320-
}}
321-
/>
322-
{localGA.enableGa && (
323-
<InputField
324-
title={t("Tracking ID")}
325-
value={settingsItem.trackingId}
326-
onChange={(trackingId: string) => {
327-
setLocalGA((s) => ({ ...s, trackingId }));
314+
{!hideGASettings ? (
315+
<SettingsFields>
316+
<TitleWrapper size="body" weight="bold">
317+
{t("Google Analytics")}
318+
</TitleWrapper>
319+
<SwitchField
320+
title={t("Enable Google Analytics")}
321+
value={localGA.enableGa ?? false}
322+
onChange={(enableGa: boolean) => {
323+
setLocalGA((s) => ({ ...s, enableGa }));
328324
}}
329-
onChangeComplete={handleSubmitGA}
330325
/>
331-
)}
332-
</SettingsFields>
326+
{localGA.enableGa && (
327+
<InputField
328+
title={t("Tracking ID")}
329+
value={settingsItem.trackingId}
330+
onChange={(trackingId: string) => {
331+
setLocalGA((s) => ({ ...s, trackingId }));
332+
}}
333+
onChangeComplete={handleSubmitGA}
334+
/>
335+
)}
336+
</SettingsFields>
337+
) : null}
333338
</SettingsWrapper>
334339
);
335340
};

web/src/services/i18n/translations/en.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ Add 3D Tiles: ''
351351
Add Photogrammetric 3D model: ''
352352
Add Point Cloud: ''
353353
Add Google Photorealistic 3D Tiles: ''
354+
Add infobox to show all properties: ''
355+
Add infobox to show specific properties: ''
356+
Add infobox to show rich blocks: ''
354357
Add OSM 3D Tiles: ''
355358
Hide Fly To Delete Layer: ''
356359
Override Layer Data: ''
357360
Show Selected Features Information: ''
358-
Add infobox to show all properties: ''
359-
Add infobox to show specific properties: ''
360-
Add infobox to show rich blocks: ''
361361
Layer Styling Examples: ''
362362
Feature Style 3D Model: ''
363363
Feature Style 3D Tiles: ''

web/src/services/i18n/translations/ja.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,16 +351,16 @@ Add KML: KMLを追加
351351
Add WMS: WMSを追加
352352
Add CZML: CZMLを追加
353353
Add 3D Tiles: 3Dタイルを追加
354-
Add Photogrammetric 3D model: 'フォトグラメトリ3Dモデルを追加'
355-
Add Point Cloud: '点群データを追加'
354+
Add Photogrammetric 3D model: フォトグラメトリ3Dモデルを追加
355+
Add Point Cloud: 点群データを追加
356356
Add Google Photorealistic 3D Tiles: Google Photorealistic 3D Tilesを追加
357+
Add infobox to show all properties: 全てのプロパティを表示するインフォボックスを追加
358+
Add infobox to show specific properties: 特定のプロパティを表示するインフォボックスを追加
359+
Add infobox to show rich blocks: リッチブロックを表示するインフォボックスを追加
357360
Add OSM 3D Tiles: OSM 3D Tilesを追加
358361
Hide Fly To Delete Layer: カメラ移動とレイヤーの削除
359362
Override Layer Data: レイヤーデータの上書き
360363
Show Selected Features Information: 選択された地物情報を表示
361-
Add infobox to show all properties: 全てのプロパティを表示するインフォボックスを追加
362-
Add infobox to show specific properties: 特定のプロパティを表示するインフォボックスを追加
363-
Add infobox to show rich blocks: リッチブロックを表示するインフォボックスを追加
364364
Layer Styling Examples: レイヤースタイリング
365365
Feature Style 3D Model: フィーチャースタイル 3D モデル
366366
Feature Style 3D Tiles: フィーチャースタイル 3D タイル

0 commit comments

Comments
 (0)