Skip to content

Commit 29ab8ae

Browse files
authored
Fix opacity for the Cody banner (#1199)
<!-- Explain the changes introduced in your PR --> ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.
1 parent bace307 commit 29ab8ae

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/components/Layout.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
'use client';
22

3-
import {Hero} from '@/components/Hero';
4-
import {Logo} from '@/components/Logo';
5-
import {MobileNavigation} from '@/components/MobileNavigation';
6-
import {Navigation} from '@/components/Navigation';
7-
import {ThemeSelector} from '@/components/ThemeSelector';
3+
import { Hero } from '@/components/Hero';
4+
import { Logo } from '@/components/Logo';
5+
import { MobileNavigation } from '@/components/MobileNavigation';
6+
import { Navigation } from '@/components/Navigation';
7+
import { ThemeSelector } from '@/components/ThemeSelector';
88
import clsx from 'clsx';
99
import Link from 'next/link';
10-
import {usePathname} from 'next/navigation';
11-
import {useEffect, useState} from 'react';
12-
import {LogoMark} from './LogoMark';
10+
import { usePathname } from 'next/navigation';
11+
import { useEffect, useState } from 'react';
12+
import { LogoMark } from './LogoMark';
13+
import { Search } from './search/Search';
1314
import VersionSelector from './VersionSelector';
14-
import {Search} from './search/Search';
15-
import {TopBanner} from './TopBanner'
1615

1716
function GitHubIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
1817
return (
@@ -30,7 +29,7 @@ function Header() {
3029
setIsScrolled(window.scrollY > 0);
3130
}
3231
onScroll();
33-
window.addEventListener('scroll', onScroll, {passive: true});
32+
window.addEventListener('scroll', onScroll, { passive: true });
3433
return () => {
3534
window.removeEventListener('scroll', onScroll);
3635
};
@@ -100,7 +99,7 @@ function Header() {
10099
);
101100
}
102101

103-
export function Layout({children}: {children: React.ReactNode}) {
102+
export function Layout({ children }: { children: React.ReactNode }) {
104103
let pathname = usePathname();
105104
let isHomePage = pathname === '/';
106105
let isCodyDocs = pathname.includes('/cody');
@@ -111,14 +110,14 @@ export function Layout({children}: {children: React.ReactNode}) {
111110
<Header />
112111

113112
{/* Cody docs banner */}
114-
{isCodyDocs && !isopenCtxDocs && <TopBanner
113+
{/*isCodyDocs && !isopenCtxDocs && <TopBanner
115114
text="NEW: Introducing chat and search in a single input with Sourcegraph 6.0."
116115
link="https://sourcegraph.com/blog/combining-chat-and-search"
117116
linkText="Read here"
118117
textColor="#ffffff"
119118
backgroundColor="#F34E3F"
120-
opacity='0.75'
121-
/>}
119+
opacity='0.80'
120+
/>/*}
122121
123122
{/* Openctx docs banner */}
124123
{/* {isopenCtxDocs && <TopBanner

0 commit comments

Comments
 (0)