Skip to content

Commit 80a61e8

Browse files
committed
- Improved nesting of list elements and anchor elements
- removed usage of defaultProps due to deprecation warnings for making it future safe. Signed-off-by: Falgun Patel <[email protected]>
1 parent c22a0da commit 80a61e8

File tree

4 files changed

+60
-66
lines changed

4 files changed

+60
-66
lines changed

src/components/HandbookCard/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { HandbookCardWrapper } from "./HandbookCard.style";
66
const HandbookCard = ({ title, description, to }) => {
77
return (
88
<HandbookCardWrapper>
9-
<Link to={to} class="handbook__card--main">
9+
<Link to={to} className="handbook__card--main">
1010
<div className="handbook__card">
1111
<h1 className="handbook__card--head">{title}</h1>
1212
<div className="handbook__card--line"></div>
@@ -15,9 +15,9 @@ const HandbookCard = ({ title, description, to }) => {
1515
</p>
1616
{to && (
1717
<div className="handbook__card--lm__container">
18-
<a href={to} className="handbook__card--lm">
18+
<span className="handbook__card--lm">
1919
Read More <HiOutlineChevronRight />
20-
</a>
20+
</span>
2121
</div>
2222
)}
2323
</div>

src/components/SistentNavigation/index.js

+53-51
Original file line numberDiff line numberDiff line change
@@ -64,76 +64,78 @@ const TOC = () => {
6464
</li>
6565
<li>
6666
<div>
67-
<li
67+
<div
6868
className="toc-sub-heading identity"
6969
onClick={() => setExpandIdentity((prev) => !prev)}
7070
>
7171
Identity
7272
{expandIdenity ? <IoIosArrowUp /> : <IoIosArrowDown />}
73-
</li>
73+
</div>
7474
{expandIdenity && (
7575
<div className="identity-sublinks">
76-
<li>
77-
<Link
78-
to="/projects/sistent/identity/color"
79-
className={`toc-sub-heading toc-sub-inline identity-item ${
80-
location.pathname.includes(
81-
"/projects/sistent/identity/color"
82-
)
83-
? "active"
84-
: ""
85-
}`}
86-
activeClassName="active"
87-
>
88-
Color
89-
</Link>
90-
</li>
91-
<li>
92-
<Link
93-
to="/projects/sistent/identity/spacing"
94-
className={`toc-sub-heading toc-sub-inline identity-item ${
95-
location.pathname.includes(
96-
"/projects/sistent/identity/spacing"
97-
)
98-
? "active"
99-
: ""
100-
}`}
101-
activeClassName="active"
102-
>
103-
Spacing
104-
</Link>
105-
</li>
106-
<li>
107-
<Link
108-
to="/projects/sistent/identity/typography"
109-
className={`toc-sub-heading toc-sub-inline identity-item ${
110-
location.pathname.includes(
111-
"/projects/sistent/identity/typography"
112-
)
113-
? "active"
114-
: ""
115-
}`}
116-
activeClassName="active"
117-
>
118-
Typography
119-
</Link>
120-
</li>
76+
<ul className="toc-ul">
77+
<li>
78+
<Link
79+
to="/projects/sistent/identity/color"
80+
className={`toc-sub-heading toc-sub-inline identity-item ${
81+
location.pathname.includes(
82+
"/projects/sistent/identity/color"
83+
)
84+
? "active"
85+
: ""
86+
}`}
87+
activeClassName="active"
88+
>
89+
Color
90+
</Link>
91+
</li>
92+
<li>
93+
<Link
94+
to="/projects/sistent/identity/spacing"
95+
className={`toc-sub-heading toc-sub-inline identity-item ${
96+
location.pathname.includes(
97+
"/projects/sistent/identity/spacing"
98+
)
99+
? "active"
100+
: ""
101+
}`}
102+
activeClassName="active"
103+
>
104+
Spacing
105+
</Link>
106+
</li>
107+
<li>
108+
<Link
109+
to="/projects/sistent/identity/typography"
110+
className={`toc-sub-heading toc-sub-inline identity-item ${
111+
location.pathname.includes(
112+
"/projects/sistent/identity/typography"
113+
)
114+
? "active"
115+
: ""
116+
}`}
117+
activeClassName="active"
118+
>
119+
Typography
120+
</Link>
121+
</li>
122+
</ul>
121123
</div>
122124
)}
123125
</div>
124126
</li>
125127
<li>
126128
<div>
127-
<li
129+
<div
128130
className="toc-sub-heading components"
129131
onClick={() => setExpandComponent((prev) => !prev)}
130132
>
131133
Components
132134
{expandComponent ? <IoIosArrowUp /> : <IoIosArrowDown />}
133-
</li>
135+
</div>
134136
{expandComponent && (
135137
<div className="components-sublinks">
136-
<li>
138+
<ul className="toc-ul">
137139
{sortedComponentArray.map((component) => (
138140
<li key={component.id}>
139141
<Link
@@ -149,7 +151,7 @@ const TOC = () => {
149151
</Link>
150152
</li>
151153
))}
152-
</li>
154+
</ul>
153155
</div>
154156
)}
155157
</div>

src/components/seo.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export const useSiteMetadata = () => {
2424
return data.site.siteMetadata;
2525
};
2626

27-
28-
const SEO = ({ canonical, description,image, schemaMarkup, title,children }) => {
27+
const SEO = ({ canonical, description = "", image = null, schemaMarkup, title, children }) => {
2928
const { pathname } = useLocation();
3029
const { title: defaultTitle, description: defaultDescription, image: siteMetadataImage, siteUrl, twitterUsername } = useSiteMetadata();
3130
const seo = {
@@ -68,21 +67,14 @@ const SEO = ({ canonical, description,image, schemaMarkup, title,children }) =>
6867
);
6968
};
7069

71-
SEO.defaultProps = {
72-
title: null,
73-
lang: "en",
74-
meta: [],
75-
description: "",
76-
image: null,
77-
};
78-
7970
SEO.propTypes = {
8071
canonical: PropTypes.string,
8172
description: PropTypes.string,
8273
image: PropTypes.string,
8374
lang: PropTypes.string,
8475
meta: PropTypes.arrayOf(PropTypes.object),
8576
title: PropTypes.string.isRequired,
77+
children: PropTypes.node,
8678
};
8779

8880
export default SEO;

src/sections/Projects/Sistent/components/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ const SistentComponents = () => {
5858
</div>
5959
<div>
6060
<div className="card_bottom">
61-
<a className="learn" href={comp.url}>
61+
<span className="learn">
6262
<div className="learn-more">
6363
<div>Learn more</div>
6464
<div className="icon">
6565
<FaArrowRight />
6666
</div>
6767
</div>
68-
</a>
68+
</span>
6969
</div>
7070
</div>
7171
</div>

0 commit comments

Comments
 (0)