From 201fa4d5640334c273328edcdf90b218966aa08d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 11 Apr 2022 13:05:48 +0200 Subject: [PATCH 1/3] #316 - Fix draft tab navigation --- CHANGELOG.md | 6 +++++ .../components/Navigation.tsx | 11 ++++---- src/dashboardWebView/hooks/usePages.tsx | 25 ++++++++++++++++--- .../state/atom/TabInfoAtom.ts | 6 +++++ src/dashboardWebView/state/atom/index.ts | 1 + 5 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 src/dashboardWebView/state/atom/TabInfoAtom.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d80b140..5d4cde89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [7.1.2] - 2022-04-11 + +### 🐞 Fixes + +- [#316](https://github.com/estruyf/vscode-front-matter/issues/316): Fix draft tab navigation + ## [7.1.1] - 2022-04-08 ### 🐞 Fixes diff --git a/src/dashboardWebView/components/Navigation.tsx b/src/dashboardWebView/components/Navigation.tsx index 3f04e806..4c9fc5eb 100644 --- a/src/dashboardWebView/components/Navigation.tsx +++ b/src/dashboardWebView/components/Navigation.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; import { Tab } from '../constants/Tab'; -import { SettingsAtom, TabAtom } from '../state'; +import { SettingsAtom, TabAtom, TabInfoAtom } from '../state'; export interface INavigationProps { totalPages: number; @@ -15,8 +15,9 @@ export const tabs = [ export const Navigation: React.FunctionComponent = ({totalPages}: React.PropsWithChildren) => { const [ crntTab, setCrntTab ] = useRecoilState(TabAtom); + const tabInfo = useRecoilValue(TabInfoAtom); const settings = useRecoilValue(SettingsAtom); - + return (