completionId: cgen-43d3b432e791469fafaee4f1aae042d1
cgen-43d3b432e791469fafaee4f1aae042d1
This commit is contained in:
parent
a355f2c9fd
commit
680747a89b
1 changed files with 2 additions and 12 deletions
|
|
@ -106,16 +106,6 @@ const SubdomainPassport = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
|
|
||||||
// Check if server pre-fetched the data (for SSR)
|
|
||||||
const preloadedData = (window as any).__PASSPORT_DATA__;
|
|
||||||
if (preloadedData) {
|
|
||||||
console.log("[SubdomainPassport] Using pre-fetched server data");
|
|
||||||
setData(preloadedData);
|
|
||||||
setLoading(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback to API call if no preloaded data
|
|
||||||
const apiBase = getApiBase();
|
const apiBase = getApiBase();
|
||||||
if (!apiBase) {
|
if (!apiBase) {
|
||||||
setError("Cannot determine API base");
|
setError("Cannot determine API base");
|
||||||
|
|
@ -125,11 +115,11 @@ const SubdomainPassport = () => {
|
||||||
|
|
||||||
let url = "";
|
let url = "";
|
||||||
if (subdomainInfo.isCreatorPassport) {
|
if (subdomainInfo.isCreatorPassport) {
|
||||||
url = `${apiBase}/api/passport/subdomain/${encodeURIComponent(
|
url = `${apiBase}/api/passport/subdomain-data/${encodeURIComponent(
|
||||||
subdomainInfo.subdomain,
|
subdomainInfo.subdomain,
|
||||||
)}`;
|
)}`;
|
||||||
} else if (subdomainInfo.isProjectPassport) {
|
} else if (subdomainInfo.isProjectPassport) {
|
||||||
url = `${apiBase}/api/passport/group/${encodeURIComponent(
|
url = `${apiBase}/api/passport/project-data/${encodeURIComponent(
|
||||||
subdomainInfo.subdomain,
|
subdomainInfo.subdomain,
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue