Skip to content

Commit c94188e

Browse files
committed
chore: update link in banner and add test for scroll behavior
1 parent 17a393f commit c94188e

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import { getGreeting } from '../support/app.po';
2-
31
describe('brenden-dev', () => {
42
beforeEach(() => cy.visit('/'));
53

6-
it('should display welcome message', () => {
7-
// Custom command example, see `../support/commands.ts` file
8-
cy.login('my-email@something.com', 'myPassword');
9-
10-
// Function helper example, see `../support/app.po.ts` file
11-
getGreeting().contains('Welcome brenden-dev');
4+
it('should show the full header on scroll', () => {
5+
cy.get('header a').should('not.be.visible');
6+
cy.scrollTo(0, 400);
7+
cy.get('header a').should('be.visible');
128
});
139
});

libs/react/components/src/lib/banner/banner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface BannerProps {}
44
export function Banner(props: BannerProps) {
55
return (
66
<aside className="float-left fixed mt-2 bg-red-600 pl-24 pr-32 py-3 m-0 z-50 -left-20 top-6 -rotate-45 shadow-xl">
7-
<a href="https://github.com/bniedermeyer/bniedermeyer.github.io/tree/rebuild">
7+
<a href="https://brenden.codes/rebuilding-my-home-on-the-web">
88
<p className="text-white">Being built in public!</p>
99
</a>
1010
</aside>

libs/react/components/src/lib/navbar/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function Navbar({ displayFull = true }: NavbarProps) {
2929
className={`flex items-center ${
3030
displayFull
3131
? 'opacity-100 transition-opacity duration-700 ease-in-out reduce-motion:transition-none'
32-
: 'transition-opacity opacity-0'
32+
: 'transition-opacity opacity-0 pointer-events-none'
3333
}`}
3434
>
3535
<span className="self-center text-2xl text-primary-dark font-semibold whitespace-nowrap dark:text-secondary-dark">

libs/react/hooks/src/useDocumentScrollThrottled.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ export function useDocumentScrollThrottled(
3232

3333
return () =>
3434
window.removeEventListener('scroll', handleDocumentScrollThrottled);
35-
}, [handleDocumentScrollThrottled]);
35+
// eslint-disable-next-line react-hooks/exhaustive-deps -- we only want this called at mount and unmount
36+
}, []);
3637
}

0 commit comments

Comments
 (0)