From 96ad275e476faf3f9d48d30760ea7b682cdc52de Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Tue, 28 May 2024 20:04:55 +0100 Subject: [PATCH 1/2] refactor: rename fmtm.dev --> docs.fmtm.dev for docs site --- README.md | 6 +++--- docs/CNAME | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a79ef2634e..dfc78508ba 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Coordinated field mapping for Open Mapping campaigns. | **Tech Stack** | ![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge&logo=fastapi) ![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB) ![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white) ![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=for-the-badge&logo=kubernetes&logoColor=white) ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white) | | **Code Style** | ![Backend Style](https://img.shields.io/badge/code%20style-black-black) ![Frontend Style](https://img.shields.io/badge/code%20style-prettier-F7B93E?logo=Prettier) ![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white) | | **Metrics** | [![All Contributors](https://img.shields.io/github/all-contributors/hotosm/fmtm?color=ee8449&style=flat-square)](#contributors-) [![Coverage](https://hotosm.github.io/fmtm/coverage.svg)](https://hotosm.github.io/fmtm/coverage.html) | -| **Other Info** | [![docs](https://github.com/hotosm/fmtm/blob/development/docs/images/docs_badge.svg?raw=true)](https://hotosm.github.io/fmtm/) [![user-roadmap](https://github.com/hotosm/fmtm/blob/development/docs/images/user_roadmap_badge.svg?raw=true)](https://fmtm.dev/user-roadmap) [![dev-roadmap](https://github.com/hotosm/fmtm/blob/development/docs/images/dev_roadmap_badge.svg?raw=true)](https://roadmap.fmtm.dev) [![timeline](https://github.com/hotosm/fmtm/blob/development/docs/images/timeline_badge.svg?raw=true)](https://fmtm.dev/timeline) [![license](https://img.shields.io/github/license/hotosm/fmtm.svg)](https://github.com/hotosm/fmtm/blob/main/LICENSE.md) | +| **Other Info** | [![docs](https://github.com/hotosm/fmtm/blob/development/docs/images/docs_badge.svg?raw=true)](https://hotosm.github.io/fmtm/) [![user-roadmap](https://github.com/hotosm/fmtm/blob/development/docs/images/user_roadmap_badge.svg?raw=true)](https://docs.fmtm.dev/user-roadmap) [![dev-roadmap](https://github.com/hotosm/fmtm/blob/development/docs/images/dev_roadmap_badge.svg?raw=true)](https://roadmap.fmtm.dev) [![timeline](https://github.com/hotosm/fmtm/blob/development/docs/images/timeline_badge.svg?raw=true)](https://docs.fmtm.dev/timeline) [![license](https://img.shields.io/github/license/hotosm/fmtm.svg)](https://github.com/hotosm/fmtm/blob/main/LICENSE.md) | --- @@ -29,7 +29,7 @@ the FMTM aims to solve the problem of **coordinating** field mapping campaigns. > More details can be found in this > [overview](https://www.hotosm.org/updates/field-mapping-tasking-manager-fmtm), -> [timeline](./docs/timeline.md) and the [docs](https://fmtm.dev) page. +> [timeline](./docs/timeline.md) and the [docs](https://docs.fmtm.dev) page. ## How FMTM Works @@ -88,7 +88,7 @@ use the convenience script: curl --proto '=https' --tlsv1.2 -sSf https://get.fmtm.dev | bash ``` -Alternatively see the [docs](https://fmtm.dev) for various deployment guides. +Alternatively see the [docs](https://docs.fmtm.dev) for various deployment guides. ## Contributors ✨ diff --git a/docs/CNAME b/docs/CNAME index bedcdccf15..7126428620 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -fmtm.dev \ No newline at end of file +docs.fmtm.dev \ No newline at end of file From 6a79d45b8cb21add4ce5070f1f6e456727451fc9 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 29 May 2024 14:56:13 +0100 Subject: [PATCH 2/2] fix(frontend): correctly invoke matomo & sentry tracking in prod --- src/frontend/src/main.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/main.tsx b/src/frontend/src/main.tsx index 39af7b64e5..7d43cb76e6 100644 --- a/src/frontend/src/main.tsx +++ b/src/frontend/src/main.tsx @@ -50,7 +50,7 @@ axios.interceptors.request.use( (function sentryInit() { // Immediately invoked function to enable Sentry monitoring - if (import.meta.env.MODE === 'development' || import.meta.env.BASE_URL !== 'fmtm.hotosm.org') { + if (import.meta.env.MODE === 'development' || window.location.hostname !== 'fmtm.hotosm.org') { return; } console.log('Adding Sentry'); @@ -76,7 +76,7 @@ axios.interceptors.request.use( (function matomoTrackingInit() { // Immediately invoked function to enable Matomo tracking - if (import.meta.env.MODE === 'development' || import.meta.env.BASE_URL !== 'fmtm.hotosm.org') { + if (import.meta.env.MODE === 'development' || window.location.hostname !== 'fmtm.hotosm.org') { return; } console.log('Adding Matomo');