We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e2cbf9 commit 06a9da1Copy full SHA for 06a9da1
1 file changed
src/pages/projects/index.js
@@ -172,6 +172,14 @@ function Projects() {
172
window.$(".stack").lettering();
173
}, [])
174
175
+ useEffect(() => {
176
+ if (!window.location.hash) return
177
+ let mayBeTag = decodeURI(window.location.hash.slice(1,window.location.hash.length)).replace('tag_',"")
178
+ if (tags.includes(mayBeTag)){
179
+ setCurrentTag(mayBeTag)
180
+ }
181
+ },[])
182
+
183
return (
184
<Layout title="Projects">
185
{/*
@@ -188,7 +196,10 @@ function Projects() {
188
196
<button
189
197
key={tag}
190
198
className={clsx(styles.tag, currentTag === tag && styles.tagActive)}
191
- onClick={() => setCurrentTag(tag)}
199
+ onClick={() => {
200
+ window.location.hash = 'tag_' + tag
201
+ setCurrentTag(tag)
202
+ }}
192
203
>
193
204
{ tag }
194
205
</button>)
0 commit comments