Skip to content

Commit a573800

Browse files
authored
Fix: Bug and Responsiveness (#849)
* fixed button bug and team responsiveness * lint fix * found the real issue...
1 parent 0e6e6e7 commit a573800

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
2626

27+
.vscode
28+
2729
# next.js
2830
/.next/
2931
/out/

components/ActiveLink.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ const ActiveLink = ({ children, activeClassName, ...props }) => {
1313
? `${childClassName} ${activeClassName}`.trim()
1414
: childClassName;
1515

16+
// check if it's an external link
17+
if (props.href.startsWith('http')) {
18+
return (
19+
<a
20+
href={props.href}
21+
target="_blank"
22+
rel="noopener noreferrer"
23+
>
24+
{cloneElement(child, {
25+
className: className || null,
26+
})}
27+
</a>
28+
);
29+
}
30+
1631
return (
1732
//clones child with className if className exists
1833
(<Link {...props} legacyBehavior>

styles/components/Navbar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ $committees: (studio,variables.$studio-raspberry),
9797
margin: 0;
9898
padding: 0;
9999

100+
a {
101+
color: inherit;
102+
text-decoration: none;
103+
}
104+
100105
button {
101106
background-color: transparent;
102107
border: 0;

styles/pages/committees.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,12 @@ html {
169169

170170
.officers-body-wrapper {
171171
margin: 50px auto 40px;
172-
display: flex;
173-
justify-content: center;
174172

175173
.officers-card-container {
176174
display: grid;
177-
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Ensures responsive behavior */
175+
grid-template-columns: repeat(auto-fit, 280px); /* Ensures responsive behavior */
178176
gap: 3em;
179-
max-width: 100%;
177+
width: 100%;
178+
justify-content: center;
180179
}
181180
}

0 commit comments

Comments
 (0)