Skip to content

Commit

Permalink
feat: use scroll to top component from shared components (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Jun 12, 2024
1 parent 2b0d76b commit 27eef32
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ npm/npmjs/@babel/template/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@babel/traverse/7.24.1, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13926
npm/npmjs/@babel/types/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/3.0.17, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #14247
npm/npmjs/@catena-x/portal-shared-components/3.0.21, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #14247
npm/npmjs/@cspotcode/source-map-support/0.8.1, MIT, approved, clearlydefined
npm/npmjs/@date-io/core/3.0.0, MIT, approved, clearlydefined
npm/npmjs/@date-io/date-fns/3.0.0, MIT, approved, #14023
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^3.0.17",
"@catena-x/portal-shared-components": "^3.0.21",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@hookform/error-message": "^2.0.1",
Expand Down
16 changes: 5 additions & 11 deletions src/components/shared/frame/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
********************************************************************************/

import { useEffect, useState } from 'react'
import { Navigation, IconButton } from '@catena-x/portal-shared-components'
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward'
import {
Navigation,
ScrollToTopButton,
} from '@catena-x/portal-shared-components'
import { useTranslation } from 'react-i18next'
import { NavLink, useLocation } from 'react-router-dom'
import './Footer.scss'
Expand Down Expand Up @@ -83,15 +85,7 @@ export const Footer = ({ pages }: { pages: string[] }) => {

return (
<footer style={{ background: getPreferredColor() }}>
{showScrollToTop && (
<IconButton
color="secondary"
onClick={scrollToTop}
sx={{ position: 'absolute', right: '40px', top: '2px' }}
>
<ArrowUpwardIcon />
</IconButton>
)}
{showScrollToTop && <ScrollToTopButton onButtonClick={scrollToTop} />}
<img
className="footer-head"
src="/orange-background-head.svg"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@catena-x/portal-shared-components@^3.0.17":
version "3.0.17"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.0.17.tgz#ce93d6ae694161553ffa6c534162ee46e2468105"
integrity sha512-5VMT8N6VKMqNABB0H0+Wl03HyQtQ5k7cVoUZAHmYgwQRyzyzH3RLj0Oo1AWS1b6DZYr4X/jVVAyfjXuf0SL2zA==
"@catena-x/portal-shared-components@^3.0.21":
version "3.0.21"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.0.21.tgz#5f38e774bb3344c6c1fb50e4d2cf769906273322"
integrity sha512-ZtninHWJMO8iEg1d+kK038247nDHs4KaaEE7wJa+pXt+POexDfNdhY0waKSRKdE5r4raD7vAT3ou1O9RfR6V/Q==
dependencies:
"@date-io/date-fns" "^3.0.0"
"@emotion/react" "^11.11.4"
Expand Down

0 comments on commit 27eef32

Please sign in to comment.