tweak: change getBasePath implementation
Unnecessary to expose the vercel url.
This commit is contained in:
parent
73329df47b
commit
fc84300712
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user