Skip to content

Commit 4656d60

Browse files
Fix ScrollToComments story in storybook
1 parent f27e0f7 commit 4656d60

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/frontend/components/PkpComments/ScrollToComments.stories.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import '@/styles/frontend-theme.css';
22
import PkpScrollToComments from './PkpScrollToComments.vue';
33
import PkpScrollToCommentsLogInto from './PkpScrollToCommentsLogInto.vue';
4+
import {usePkpCommentsStore} from './usePkpCommentsStore';
45

56
export default {
67
title: 'Frontend/PkpComments/PkpScrollToComments',
@@ -53,7 +54,8 @@ export const CustomAllComments = {
5354
render: () => ({
5455
components: {PkpScrollToComments, PkpScrollToCommentsLogInto},
5556
setup() {
56-
return {commentsStore: window.pkp.registry.getPiniaStore('pkpComments')};
57+
const commentsStore = usePkpCommentsStore();
58+
return {commentsStore};
5759
},
5860
template: `
5961
<PkpScrollToComments>
@@ -96,9 +98,6 @@ export const CustomLogInto = {
9698
],
9799
render: () => ({
98100
components: {PkpScrollToComments, PkpScrollToCommentsLogInto},
99-
setup() {
100-
return {commentsStore: window.pkp.registry.getPiniaStore('pkpComments')};
101-
},
102101
template: `
103102
<PkpScrollToComments>
104103
<PkpScrollToCommentsLogInto

0 commit comments

Comments
 (0)