diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-24 22:48:55 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-24 22:48:55 +0200 |
| commit | 9354d69acff0104366a1b90f635c9b1475610528 (patch) | |
| tree | e318df212c2005231d46e4fedc516fbb89e7d240 /apps | |
| parent | f8a4cd4ac657af57d4a4acd387ecc88924389886 (diff) | |
| download | opencut-9354d69acff0104366a1b90f635c9b1475610528.tar.gz | |
feat(header): conditionally render 'Editor' or 'GitHub' button based on environment
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/src/components/header.tsx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/web/src/components/header.tsx b/apps/web/src/components/header.tsx index 35ad1076..787b2610 100644 --- a/apps/web/src/components/header.tsx +++ b/apps/web/src/components/header.tsx @@ -41,12 +41,21 @@ export function Header() { Contributors
</Button>
</Link>
- <Link href="https://github.com/OpenCut-app/OpenCut" target="_blank">
- <Button size="sm" className="text-sm ml-4">
- GitHub
- <ArrowRight className="h-4 w-4" />
- </Button>
- </Link>
+ {process.env.NODE_ENV === "development" ? (
+ <Link href="/editor" target="_blank">
+ <Button size="sm" className="text-sm ml-4">
+ Editor
+ <ArrowRight className="h-4 w-4" />
+ </Button>
+ </Link>
+ ) : (
+ <Link href="https://github.com/OpenCut-app/OpenCut" target="_blank">
+ <Button size="sm" className="text-sm ml-4">
+ GitHub
+ <ArrowRight className="h-4 w-4" />
+ </Button>
+ </Link>
+ )}
</nav>
);
|
