Skip to content

Commit

Permalink
EDSC-4326: Upgrading edsc-eslint-config and cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorlang committed Dec 12, 2024
1 parent 080cc1f commit 9106e80
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
16 changes: 7 additions & 9 deletions example/src/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ const Layout = () => (
<LinkContainer to="/">
<Nav.Link>Demo</Nav.Link>
</LinkContainer>
<NavDropdown id="additional-demos-dropdown" title="Additional Demos">
{
routes.map(({ title, to }) => {
return (
<NavDropdown.Item key={`link__${to}`} to={to} as={LinkContainer}>
<Nav.Link>{title}</Nav.Link>
</NavDropdown.Item>
)
})
<NavDropdown id="additional-demos-dropdown" title="Additional Demos">
{
routes.map(({ title, to }) => (
<NavDropdown.Item key={`link__${to}`} to={to} as={LinkContainer}>
<Nav.Link>{title}</Nav.Link>
</NavDropdown.Item>
))
}
</NavDropdown>
</Nav>
Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@babel/register": "^7.17.7",
"@cypress/code-coverage": "^3.9.12",
"@cypress/webpack-preprocessor": "^5.15.7",
"@edsc/eslint-config": "^0.0.5",
"@edsc/eslint-config": "^0.0.6",
"@testing-library/dom": "^8.19.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
Expand Down
19 changes: 8 additions & 11 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,17 @@ export const EDSCTimeline = ({
* Calculates the new intervals list width
*/
const calculateNewIntervalListWidth = () => {
if (timelineWrapperRef.current) {
// Anytime new time intervals are calculated update the pixel width of their container
const duration = getIntervalsDuration(timeIntervals, zoomLevel)
const duration = getIntervalsDuration(timeIntervals, zoomLevel)

const newTimelineWrapperWidth = timelineWrapperRef.current.getBoundingClientRect().width
const newTimelineWrapperWidth = timelineWrapperRef.current.getBoundingClientRect().width

const width = determineScaledWidth(
duration,
zoomLevel,
newTimelineWrapperWidth
)
const width = determineScaledWidth(
duration,
zoomLevel,
newTimelineWrapperWidth
)

return width
}
return width
}

// On page load, set the interval list width
Expand Down

0 comments on commit 9106e80

Please sign in to comment.