fix(bug): fixed1296 href link switch (#1317)

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
This commit is contained in:
Aditya Deshlahre
2023-10-19 23:49:44 +05:30
committed by GitHub
parent 83b11dea41
commit 43e80d8185

View File

@@ -8,7 +8,7 @@ interface EnvironmentNoticeProps {
export default async function EnvironmentNotice({ environmentId }: EnvironmentNoticeProps) {
const headersList = headers();
const currentUrl = headersList.get("x-invoke-path") || "";
const currentUrl = headersList.get("referer") || headersList.get("x-invoke-path") || "";
const environment = await getEnvironment(environmentId);
const environments = await getEnvironments(environment.productId);
const otherEnvironmentId = environments.find((e) => e.id !== environment.id)?.id || "";