Skip to content

Commit

Permalink
Set public url as a prefix for preset dasta (#941)
Browse files Browse the repository at this point in the history
Close US-GHG-Center/veda-config-ghg#377
I somehow thought that we were handling baseurl on axios configuration
level, but it seems we are not.

Thanks @slesaad for putting a work-around. - I have a question based on
my curiosity - why did preset request work on staging? I think it should
have failed since the requests were made directly to staging.earth.gov,
not staging.earth.gov/ghgcenter but they worked. Do you have an idea ?
  • Loading branch information
hanbyul-here authored May 7, 2024
2 parents d424d23 + d4bd41b commit bbcd97f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import axios from 'axios';

import { getAoiAppropriateFeatures } from './use-custom-aoi';

const presetFilePath = `/public/geo-data/states/`;
const presetFilePath = `${process.env.PUBLIC_URL ?? ''}/public/geo-data/states/`;
const presetSuffix = `.geojson`;

function usePresetAOI(selectedState) {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/components/common/meta-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLocation } from 'react-router-dom';
const appTitle = process.env.APP_TITLE;
const baseUrl = window.location.origin;

const defaultMetaImage = `${process.env.PUBLIC_URL ?? '/'}/meta/meta-image.png`;
const defaultMetaImage = `${process.env.PUBLIC_URL ?? ''}/meta/meta-image.png`;

function MetaTags({ title, description, thumbnail, children }) {
const theme = useTheme();
Expand Down

0 comments on commit bbcd97f

Please sign in to comment.