fix: shareUrl missing basePath

This commit is contained in:
nailuoGG
2023-07-25 13:50:51 +08:00
parent 7bfbe26485
commit e7336601a6

View File

@@ -25,7 +25,7 @@ export function ShareUrl({ websiteId, data, onSave }) {
);
const ref = useRef(null);
const url = useMemo(
() => `${process.env.analyticsUrl || location.origin}/share/${id}/${encodeURIComponent(name)}`,
() => `${process.env.analyticsUrl || location.origin}${process.env.BASE_PATH || ''}/share/${id}/${encodeURIComponent(name)}`,
[id, name],
);