tweak: change getBasePath implementation

Unnecessary to expose the vercel url.
This commit is contained in:
NunoSempere 2022-11-17 20:16:24 +00:00
parent 73329df47b
commit fc84300712
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ const Section: React.FC<{ title: string; id?: string }> = ({
const EmbedSection: React.FC<{ question: QuestionWithHistoryFragment }> = ({
question,
}) => {
const url = /*getBasePath() + */ `https://metaforecast.org/questions/embed/${question.id}`;
const url = `https://${getBasePath()}/questions/embed/${question.id}`;
return (
<Section title="Embed" id="embed">
<CopyParagraph

View File

@ -2,7 +2,7 @@ import { QuestionFragment } from "./fragments.generated";
export const getBasePath = () => {
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
return `https://metaforecast.org`;//`https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
}
// can be used for local development if you prefer non-default port