Skip to content

Commit

Permalink
Fixed bug with editing meta
Browse files Browse the repository at this point in the history
  • Loading branch information
boandriy committed Jan 5, 2022
1 parent 6376ebf commit b86dfb8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
semi: false,
singleQuote: false,
trailingComma: "none",
endOfLine: "auto",
singleQuote: true,

};
5 changes: 5 additions & 0 deletions src/features/dsPreview/DatasetPreviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import ContentBoxSubTitle from "../../chrome/ContentBoxSubTitle"
import { newVersionInfoFromDataset } from '../../qri/versionInfo'
import Head from '../app/Head'
import { selectSessionUserCanEditDataset } from '../dataset/state/datasetState'
import { loadDataset } from '../dataset/state/datasetActions'

interface DatasetPreviewPageProps {
qriRef: QriRef
Expand Down Expand Up @@ -48,9 +49,13 @@ const DatasetPreviewPage: React.FC<DatasetPreviewPageProps> = ({

useEffect(() => {
const readmeComponent = document.getElementsByClassName('markdown-body')[0]
const { username, name, path } = dataset
if (readmeComponent) {
setReadmeHeight(readmeComponent.clientHeight + 64) // adding padding and see more button dimensions
}
if (username && name) {
dispatch(loadDataset({ username, name, path }))
}
}, [ dataset ])

if (expandReadme) {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4166,7 +4166,7 @@
dependencies:
"@types/react" "*"

"@types/react-virtualized@^9.21.15":
"@types/[email protected]":
version "9.21.15"
resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.21.15.tgz#349a4f9774504e514ea4c8ebbbfe6cc8db17f045"
integrity sha512-R4ntUW+Y/a7RgRpfeYz3iRe+kaDWtXieMeQum4AoYjjZsR/QhpKqFu4muSBhzA7OHJHd6qA0KkeTzxj5ah5tmQ==
Expand Down Expand Up @@ -15300,7 +15300,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/react-use-dimensions/-/react-use-dimensions-1.2.1.tgz#eb1561db7b06c393209d2bffa449931dd93f7870"
integrity sha512-XL+Rup9Hosxx3Ap9xpyQMbVwuUa4BSqiOjfBb2zDuGs4uv2FesFV+m8Z/huRx2BNptMd9ARPqFuSNA62zhCozg==

react-virtualized@^9.22.3:
[email protected]:
version "9.22.3"
resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.22.3.tgz#f430f16beb0a42db420dbd4d340403c0de334421"
integrity sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==
Expand Down

0 comments on commit b86dfb8

Please sign in to comment.