fix: shareUrl missing basePath

This commit is contained in:
nailuoGG 2023-07-25 13:50:51 +08:00
parent 7bfbe26485
commit e7336601a6
No known key found for this signature in database
GPG Key ID: 8B8E86A5C02D27C4

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],
);