Skip to content

Commit

Permalink
Merge pull request #24 from gunet/history-details-scroll
Browse files Browse the repository at this point in the history
Add scrollbar on History details page/popup
  • Loading branch information
gsiou authored Nov 28, 2024
2 parents d3f8b2b + 2570680 commit 2256ab1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/History/HistoryDetailContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import { useTranslation } from 'react-i18next';
import Slider from '../Shared/Slider';
import CredentialImage from '../Credentials/CredentialImage';
import CredentialInfo from '../Credentials/CredentialInfo';
import useScreenType from '../../hooks/useScreenType';

const HistoryDetailContent = ({ historyItem }) => {
const { t } = useTranslation();
const [currentSlide, setCurrentSlide] = React.useState(1);
const screenType = useScreenType();

const renderSlideContent = (credential) => (
<div
Expand All @@ -34,7 +36,7 @@ const HistoryDetailContent = ({ historyItem }) => {

{/* Render details of the currently selected credential */}
{historyItem[currentSlide - 1] && (
<div className="pt-5">
<div className={`pt-5 overflow-y-auto items-center custom-scrollbar ${screenType !== 'mobile' ? 'max-h-[30vh]' : 'max-h-[25vh]'} `}>
<CredentialInfo credential={historyItem[currentSlide - 1]} display='all' />
</div>
)}
Expand Down

0 comments on commit 2256ab1

Please sign in to comment.