Skip to content

Commit

Permalink
Fix show detail
Browse files Browse the repository at this point in the history
Signed-off-by: Filippo Erbisti <80033304+filippoerbisti@users.noreply.github.com>
  • Loading branch information
filippoerbisti committed Oct 6, 2022
1 parent fa9136c commit 9381e9a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ecommerce/components/Tasting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,24 @@ const Tasting = () => {
}

const viewDetail2 = () => {
let detail = document.getElementById('detail1');
let detail = document.getElementById('detail2');
detail.style.display = 'flex';
detail.style.flexDirection = 'column';
}

const hideDetail2 = () => {
let detail = document.getElementById('detail1');
let detail = document.getElementById('detail2');
detail.style.display = 'none';
}

const viewDetail3 = () => {
let detail = document.getElementById('detail1');
let detail = document.getElementById('detail3');
detail.style.display = 'flex';
detail.style.flexDirection = 'column';
}

const hideDetail3 = () => {
let detail = document.getElementById('detail1');
let detail = document.getElementById('detail3');
detail.style.display = 'none';
}

Expand Down Expand Up @@ -147,7 +147,7 @@ const Tasting = () => {
<h1 className='text-2xl my-5 uppercase'>{t('proposal2')}</h1>
<button onClick={viewDetail2}>{t('clickDetail')}</button>
<div className='proposal-card'>
<div id='detail1' className='proposal-card-detail'>
<div id='detail2' className='proposal-card-detail'>
<span className='close-proposal-detail' onClick={hideDetail2}>X</span>
<h2>{t('detail')}</h2>
<p>ciao</p>
Expand All @@ -159,7 +159,7 @@ const Tasting = () => {
<h1 className='text-2xl my-5 uppercase'>{t('proposal3')}</h1>
<button onClick={viewDetail3}>{t('clickDetail')}</button>
<div className='proposal-card'>
<div id='detail1' className='proposal-card-detail'>
<div id='detail3' className='proposal-card-detail'>
<span className='close-proposal-detail' onClick={hideDetail3}>X</span>
<h2>{t('detail')}</h2>
<p>ciao</p>
Expand Down Expand Up @@ -197,4 +197,4 @@ const Tasting = () => {
)
}

export default Tasting
export default Tasting

1 comment on commit 9381e9a

@vercel
Copy link

@vercel vercel bot commented on 9381e9a Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.