Skip to content

Commit 895888d

Browse files
committed
Get story when mounting component
1 parent c2e84a8 commit 895888d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/base/src/panelview/components/story-maps/StoryViewerPanel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ interface IStoryViewerPanelProps {
1414

1515
function StoryViewerPanel({ model }: IStoryViewerPanelProps) {
1616
const [currentIndexDisplayed, setCurrentIndexDisplayed] = useState(0);
17-
const [storyData, setStoryData] = useState<IJGISStoryMap | null>(null);
17+
const [storyData, setStoryData] = useState<IJGISStoryMap | null>(
18+
model.getSelectedStory().story ?? null,
19+
);
1820

1921
// Derive landmarks from story data
2022
const landmarks = useMemo(() => {

0 commit comments

Comments
 (0)