Skip to content

Commit 90c7896

Browse files
committed
use language + title as layout id
1 parent cd6c616 commit 90c7896

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/SnippetList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const SnippetList = () => {
3737
<motion.ul role="list" className="snippets">
3838
<AnimatePresence mode="popLayout">
3939
{fetchedSnippets.map((snippet, idx) => {
40-
const uniqueId = `${snippet.title}-${snippet.description}`;
40+
const uniqueId = `${language.lang}-${snippet.title}`;
4141
return (
4242
<motion.li
4343
key={uniqueId}

src/components/SnippetModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const SnippetModal: React.FC<Props> = ({
4949
key="modal-content"
5050
className="modal | flow"
5151
data-flow-space="lg"
52-
layoutId={`${snippet.title}-${snippet.description}`}
52+
layoutId={`${language}-${snippet.title}`}
5353
transition={{ type: "spring", duration: shouldReduceMotion ? 0 : 0.5 }}
5454
>
5555
<div className="modal__header">

0 commit comments

Comments
 (0)