Skip to content

Commit

Permalink
Fix Accordion.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Sep 30, 2024
1 parent 715f5e1 commit 27ca6ad
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions api/src/config/env.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export const STRIPE_SESSION_EXPIRE_AT = stripeSessionExpireAt
export const BOOKING_EXPIRE_AT = STRIPE_SESSION_EXPIRE_AT + (10 * 60)

/**
* Private SSL key filepath.
* Admin email.
*
* @type {string}
*/
Expand Down Expand Up @@ -539,8 +539,8 @@ export interface LocationValue extends Document {
* Country Document.
*
* @export
* @interface Location
* @typedef {Location}
* @interface Country
* @typedef {Country}
* @extends {Document}
*/
export interface Country extends Document {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/assets/css/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ div.accordion-container span.accordion-active {

div.accordion-container span.accordion-active,
div.accordion-container span.accordion:hover {
background: #fafafa;
background: #fff;
}

div.accordion-container span.accordion::after {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Accordion = ({
offsetHeight = 0,
children
}: AccordionProps) => {
const accordionRef = useRef<HTMLLabelElement>(null)
const accordionRef = useRef<HTMLSpanElement>(null)

const handleAccordionClick = (e: React.MouseEvent<HTMLElement>) => {
e.currentTarget.classList.toggle('accordion-active')
Expand All @@ -38,7 +38,7 @@ const Accordion = ({

useEffect(() => {
if (collapse && accordionRef.current) {
accordionRef.current.classList.toggle('accordion-active')
accordionRef.current.classList.add('accordion-active')
}
}, [collapse])

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/css/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ div.accordion-container span.accordion-active {

div.accordion-container span.accordion-active,
div.accordion-container span.accordion:hover {
background: #fafafa;
background: #fff;
}

div.accordion-container span.accordion::after {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Accordion = ({

useEffect(() => {
if (collapse && accordionRef.current) {
accordionRef.current.classList.toggle('accordion-active')
accordionRef.current.classList.add('accordion-active')
}
}, [collapse])

Expand Down

0 comments on commit 27ca6ad

Please sign in to comment.