Skip to content

Commit 3acf52e

Browse files
committed
fix: restore blog sidebar widget images
Move five-and-friends and discuss images to static/images and update references from relative src paths to absolute paths, fixing broken images after StaticImage was replaced with regular img tags.
1 parent 624727f commit 3acf52e

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

src/sections/Blog/Blog-sidebar/index.js

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,36 @@ import { HiOutlineChevronUp } from "@react-icons/all-files/hi/HiOutlineChevronUp
77
import { HiOutlineChevronDown } from "@react-icons/all-files/hi/HiOutlineChevronDown";
88
// import { FaSearch } from "@react-icons/all-files/fa/FaSearch";
99

10-
const Discuss = "../../../assets/images/discuss/layer5-discuss-white.webp";
11-
const FiveandFriendsAdventures =
12-
"../../../assets/images/blog/five-and-friends.webp";
10+
const Discuss = "/images/layer5-discuss-white.webp";
11+
const FiveandFriendsAdventures = "/images/five-and-friends.webp";
1312

1413
const Sidebar = ({ pageContext }) => {
15-
const data = useStaticQuery(
16-
graphql`query allTagsAndCategories {
17-
tags: allMdx(
18-
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
19-
) {
20-
group(field: {frontmatter: {tags: SELECT}}) {
21-
fieldValue
22-
totalCount
14+
const data = useStaticQuery(graphql`
15+
query allTagsAndCategories {
16+
tags: allMdx(
17+
filter: {
18+
fields: { collection: { eq: "blog" } }
19+
frontmatter: { published: { eq: true } }
20+
}
21+
) {
22+
group(field: { frontmatter: { tags: SELECT } }) {
23+
fieldValue
24+
totalCount
25+
}
26+
}
27+
categories: allMdx(
28+
filter: {
29+
fields: { collection: { eq: "blog" } }
30+
frontmatter: { published: { eq: true } }
31+
}
32+
) {
33+
group(field: { frontmatter: { category: SELECT } }) {
34+
fieldValue
35+
totalCount
36+
}
37+
}
2338
}
24-
}
25-
categories: allMdx(
26-
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
27-
) {
28-
group(field: {frontmatter: {category: SELECT}}) {
29-
fieldValue
30-
totalCount
31-
}
32-
}
33-
}`
34-
);
39+
`);
3540

3641
const [showTag, setShowTag] = useState(true);
3742
const [showCategory, setShowCategory] = useState(true);
@@ -60,7 +65,12 @@ const Sidebar = ({ pageContext }) => {
6065
<div className="card">
6166
<h2>Join the Conversation</h2>
6267
<p>On our Discussion Forum</p>
63-
<img className="logo" alt="Discuss" src={Discuss} loading="lazy" />
68+
<img
69+
className="logo"
70+
alt="Discuss"
71+
src={Discuss}
72+
loading="lazy"
73+
/>
6474
</div>
6575
</a>
6676
</div>
36.7 KB
Loading
17.7 KB
Loading

0 commit comments

Comments
 (0)