Git Repository link always shows, defaulting to the canonical upstream repo
Previously hidden entirely when NEXT_PUBLIC_GIT_REPO_URL was unset, which meant it never appeared on localhost or on anyone else's clone that hadn't explicitly configured it. It should always point somewhere - the canonical repo (git.ciagent.org) is the sensible default everywhere, overridable only by a deployment that runs its own separate git server. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
+14
-10
@@ -5,6 +5,12 @@ import { Building2, LineChart, Mail, Radar, ShieldCheck, Sparkles } from "lucide
|
||||
import { useSystemStatus } from "@/hooks/use-auth";
|
||||
import { isLocalConvenience } from "@/lib/auth";
|
||||
|
||||
// The canonical, authoritative repo - shown by default on every deployment
|
||||
// (including someone else's clone running on their own machine) unless
|
||||
// NEXT_PUBLIC_GIT_REPO_URL overrides it, e.g. because that clone runs its
|
||||
// own self-hosted git server instead of pointing back at this one.
|
||||
const CANONICAL_GIT_REPO_URL = "https://git.ciagent.org/saksham/CIAgent";
|
||||
|
||||
const steps = [
|
||||
{
|
||||
title: "Add a company",
|
||||
@@ -48,16 +54,14 @@ export default function LandingPage() {
|
||||
<div className="mx-auto flex max-w-6xl items-center justify-between px-6 py-4">
|
||||
<span className="text-lg font-semibold tracking-tight text-slate-900">CI Agent</span>
|
||||
<nav className="flex items-center gap-3">
|
||||
{process.env.NEXT_PUBLIC_GIT_REPO_URL && (
|
||||
<a
|
||||
href={process.env.NEXT_PUBLIC_GIT_REPO_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="rounded-md px-3 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100"
|
||||
>
|
||||
Git Repository
|
||||
</a>
|
||||
)}
|
||||
<a
|
||||
href={process.env.NEXT_PUBLIC_GIT_REPO_URL || CANONICAL_GIT_REPO_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="rounded-md px-3 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100"
|
||||
>
|
||||
Git Repository
|
||||
</a>
|
||||
<Link
|
||||
href="/login"
|
||||
className="rounded-md px-3 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100"
|
||||
|
||||
Reference in New Issue
Block a user