web/app/%5Bowner%5D/%5Brepo%5D/(tabs)/builds/page.tsxblame
View source
da0f6511"use client";
80fafdf2
da0f6513import { useParams } from "next/navigation";
da0f6514import { useEffect } from "react";
80fafdf5
9d879c06export default function BuildsRedirect() {
da0f6517 const { owner, repo } = useParams<{ owner: string; repo: string }>();
80fafdf8
da0f6519 useEffect(() => {
da0f65110 const host = window.location.host;
da0f65111 const protocol = window.location.protocol;
da0f65112 const canopyHost = host.startsWith("canopy.") ? host : `canopy.${host}`;
a011f1e13 const search = window.location.search;
a011f1e14 const hash = window.location.hash;
9d879c015 window.location.replace(`${protocol}//${canopyHost}/${owner}/${repo}/builds${search}${hash}`);
da0f65116 }, [owner, repo]);
818dc9017
da0f65118 return (
da0f65119 <p className="text-sm py-8 text-center" style={{ color: "var(--text-faint)" }}>
da0f65120 Redirecting to Canopy...
da0f65121 </p>
da0f65122 );
80fafdf23}