Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-2139] demo top nav #165

Merged
merged 6 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix responsiveness
  • Loading branch information
plin-stytch committed May 31, 2024
commit 53aeb45d9df11c0a0c647a16401ebcd605c73aa8
62 changes: 35 additions & 27 deletions components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import stytchLogo from '/public/stytch-logo.svg';
import Link from 'next/link';

function NavBar() {
const [windowInnerWidth, setWindowInnerWidth] = React.useState<number>(window.innerWidth);
addEventListener('resize', () => {
setWindowInnerWidth(window.innerWidth);
});
return (
<div style={styles.container}>
<div style={styles.leftNav}>
Expand All @@ -12,36 +16,40 @@ function NavBar() {
<Image alt="Stytch logo" height={30} src={stytchLogo} width={152} />
</Link>
</div>
<div style={styles.leftLinks}>
<a className="no-underline" href="https://stytch.com" rel="noopener noreferrer" target="_blank">
Stytch.com
</a>
<a className="no-underline" href="https://stytch.com/docs" rel="noopener noreferrer" target="_blank">
Documentation
</a>
<a
className="no-underline"
href="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/stytchauth/stytch-nextjs-integration"
rel="noopener noreferrer"
target="_blank"
>
Github
</a>
<a
className="no-underline"
href="https://stytch.com/docs/api/postman"
rel="noopener noreferrer"
target="_blank"
>
Postman
</a>
</div>
{windowInnerWidth > 1000 && (
<div style={styles.leftLinks}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links feel closer together, larger, and bolder than the mocks

<a className="no-underline" href="https://stytch.com" rel="noopener noreferrer" target="_blank">
Stytch.com
</a>
<a className="no-underline" href="https://stytch.com/docs" rel="noopener noreferrer" target="_blank">
Documentation
</a>
<a
className="no-underline"
href="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/stytchauth/stytch-nextjs-integration"
rel="noopener noreferrer"
target="_blank"
>
Github
</a>
<a
className="no-underline"
href="https://stytch.com/docs/api/postman"
rel="noopener noreferrer"
target="_blank"
>
Postman
</a>
</div>
)}
</div>

<div style={styles.rightLinks}>
<a className="no-underline" href="https://stytch.com/contact" rel="noopener noreferrer" target="_blank">
Contact Us
</a>
{windowInnerWidth > 600 && (
<a className="no-underline" href="https://stytch.com/contact" rel="noopener noreferrer" target="_blank">
Contact Us
</a>
)}
<a
className="no-underline"
style={styles.secondaryButton}
Expand Down
Loading