Skip to content

Commit

Permalink
Merge pull request #464 from JS-Demi/bugfix-faq-theme
Browse files Browse the repository at this point in the history
Fix bug #462
  • Loading branch information
dzencot authored Apr 16, 2024
2 parents bb948f6 + 90f6bda commit 06fc7d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions frontend/src/pages/landing/Faq.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { useContext } from 'react';
import {
Accordion,
Row,
AccordionContext,
Col,
Row,
useAccordionButton,
AccordionContext,
} from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
import { useTernaryDarkMode } from 'usehooks-ts';

function CustomToggle({ children, eventKey }) {
const { activeEventKey } = useContext(AccordionContext);
Expand All @@ -15,9 +16,8 @@ function CustomToggle({ children, eventKey }) {

const isCurrentEventKey = activeEventKey === eventKey;

const theme = document.documentElement.getAttribute('data-bs-theme');

const colorForEl = theme === 'light' ? 'black' : 'white';
const { isDarkMode } = useTernaryDarkMode();
const colorForEl = isDarkMode ? 'white' : 'black';

return (
<div
Expand Down
24 changes: 12 additions & 12 deletions frontend/src/pages/landing/Landing.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { Link, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import { Link, useNavigate } from 'react-router-dom';

import { Button, Col, Container, Image, Row } from 'react-bootstrap';

import { useAuth } from '../../hooks';
import routes from '../../routes.js';
import { actions } from '../../slices/modalSlice';
import Faq from './Faq.jsx';
import Header from './Header.jsx';
import Footer from './Footer.jsx';
import './landing.scss';
import Header from './Header.jsx';
import './assets/fonts/NunitoSans_10pt-Light.ttf';
import './landing.scss';

import Code from './assets/Icons=Code.svg';
import Devices from './assets/Icons=Devices.svg';
import Share from './assets/Icons=Share.svg';
import ImageCarousel1 from './assets/DisplayWithCode1.jpeg';
import ImageCarousel2 from './assets/DisplayWithCode2.jpeg';
import ImageCarousel3 from './assets/DisplayWithCode3.jpeg';
import ImageCarousel4 from './assets/DisplayWithCode4.jpeg';
import ImageCarousel5 from './assets/DisplayWithCode5.jpeg';
import Code from './assets/Icons=Code.svg';
import Devices from './assets/Icons=Devices.svg';
import Languages from './assets/Icons=Languages.svg';
import Share from './assets/Icons=Share.svg';
import TeamWork from './assets/Icons=TeamWork.svg';
import Template from './assets/Icons=Template.svg';
import ImageUnderCarousel from './assets/ReadyAssets.jpeg';
Expand Down Expand Up @@ -171,7 +171,7 @@ function NewLanding() {
ref={advantagesRef}
className="d-none d-lg-inline-flex my-5 overflow-auto flex-nowrap advantages-horizontal-scroll"
>
<Col clssaName="col-12" lg={{ offset: 1, span: 11 }}>
<Col className="col-12" lg={{ offset: 1, span: 11 }}>
<figure className="d-flex flex-row gap-5 align-items-center m-0 justify-content-center me-5">
<Col>
<Image
Expand All @@ -190,7 +190,7 @@ function NewLanding() {
</Col>
</figure>
</Col>
<Col clssaName="col-12" lg={{ offset: 1, span: 11 }}>
<Col className="col-12" lg={{ offset: 1, span: 11 }}>
<figure className="d-flex flex-row gap-5 align-items-center m-0 justify-content-center mx-5">
<Col>
<Image
Expand All @@ -209,7 +209,7 @@ function NewLanding() {
</Col>
</figure>
</Col>
<Col clssaName="col-12" lg={{ offset: 1, span: 11 }}>
<Col className="col-12" lg={{ offset: 1, span: 11 }}>
<figure className="d-flex flex-row gap-5 align-items-center m-0 justify-content-center mx-5">
<Col>
<Image
Expand All @@ -228,7 +228,7 @@ function NewLanding() {
</Col>
</figure>
</Col>
<Col clssaName="col-12" lg={{ offset: 1, span: 11 }}>
<Col className="col-12" lg={{ offset: 1, span: 11 }}>
<figure className="d-flex flex-row gap-5 align-items-center m-0 justify-content-center mx-5">
<Col>
<Image
Expand All @@ -247,7 +247,7 @@ function NewLanding() {
</Col>
</figure>
</Col>
<Col clssaName="col-12" lg={{ offset: 1, span: 11 }}>
<Col className="col-12" lg={{ offset: 1, span: 11 }}>
<figure className="d-flex flex-row gap-5 align-items-center m-0 justify-content-center">
<Col>
<Image
Expand Down

0 comments on commit 06fc7d3

Please sign in to comment.