Add floating action button to App component

Updated the `App` component in `app.tsx` to include a new floating action button (Fab) linking to Digital Data. The button now features a transparent background and no box shadow, along with an image for improved visual representation. The `useScrollToTop` function remains unchanged but has a more streamlined implementation.
This commit is contained in:
tekh 2025-07-02 11:16:26 +02:00
parent 8771e025bc
commit 325b27262e

View File

@ -22,8 +22,9 @@ export default function App({ children }: AppProps) {
const ddButton = () => (
<Fab
size="medium"
aria-label="Github"
href="https://github.com/minimal-ui-kit/material-kit-react"
aria-label="Digital Data"
href="https://digitaldata.works/"
target="_blank"
sx={{
zIndex: 9,
right: 20,
@ -31,10 +32,14 @@ export default function App({ children }: AppProps) {
width: 48,
height: 48,
position: 'fixed',
bgcolor: 'grey.800',
bgcolor: 'transparent',
boxShadow: 'none'
}}
>
<Iconify width={24} icon="socials:github" sx={{ '--color': 'white' }} />
<img
src="/assets/images/product/product-default.webp"
alt="Digital Data"
/>
</Fab>
);
@ -56,4 +61,4 @@ function useScrollToTop() {
}, [pathname]);
return null;
}
}