Skip to content

Commit

Permalink
Update docusaurus hook 'useColorMode' according to the update from fa…
Browse files Browse the repository at this point in the history
  • Loading branch information
K0rdan committed Jul 18, 2022
1 parent e204f22 commit 366928e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/documentation/src/components/index/anatomy/anatomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import AccountTreeIcon from '@mui/icons-material/AccountTree';
import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';

const Anatomy = (props) => {
const { isDarkTheme } = useColorMode();
const { colorMode } = useColorMode();
const img = {
topo: 'topology',
micro: 'microservice',
Expand Down Expand Up @@ -174,7 +174,7 @@ const Anatomy = (props) => {
<Grid item xs={2} md={2} lg={1} className={styles.docs}>
<FileCopyIcon fontSize="large" className={styles.icons} />
<SearchIcon fontSize="large" className={styles.icons} />
{isDarkTheme ? (
{colorMode === 'dark' ? (
<>
{' '}
<img src="img/index/header/luos.svg" alt="luos" />{' '}
Expand Down
6 changes: 3 additions & 3 deletions apps/documentation/src/components/index/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import LiteYouTubeEmbed from 'react-lite-youtube-embed';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';

const Header = (props) => {
const { isDarkTheme } = useColorMode();
const { colorMode } = useColorMode();
return (
<div className={styles.container}>
<Grid container>
Expand All @@ -32,7 +32,7 @@ const Header = (props) => {
<Grid item xs={2} md={1} lg={1} className={styles.docs}>
<FileCopyIcon fontSize="large" className={styles.icons} />
<SearchIcon fontSize="large" className={styles.icons} />
{isDarkTheme ? (
{colorMode === 'dark' ? (
<>
{' '}
<img src="img/index/header/luos.svg" alt="luos" />{' '}
Expand Down Expand Up @@ -131,7 +131,7 @@ const Header = (props) => {
<Grid item md={1} lg={1} className={styles.docs}>
<FileCopyIcon fontSize="large" className={styles.icons} />
<SearchIcon fontSize="large" className={styles.icons} />
{isDarkTheme ? (
{colorMode === 'dark' ? (
<>
{' '}
<img src="img/index/header/luos.svg" alt="luos" />{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import SearchIcon from '@mui/icons-material/Search';
// DO NOT REMOVE WIP INTEGRATION BLOCK

const Integration = (props) => {
const { isDarkTheme } = useColorMode();
const { colorMode } = useColorMode();

const img = {
mcu: [
Expand Down Expand Up @@ -131,7 +131,7 @@ const Integration = (props) => {
<Grid item md={1} lg={1} className={styles.docs}>
<FileCopyIcon fontSize="large" className={styles.icons} />
<SearchIcon fontSize="large" className={styles.icons} />
{isDarkTheme ? (
{colorMode === 'dark' ? (
<>
{' '}
<img src="img/index/header/luos.svg" alt="luos" />{' '}
Expand Down Expand Up @@ -192,7 +192,7 @@ const Integration = (props) => {
<ImageListItem key={index} alignitems="center">
<img
src={
isDarkTheme
colorMode === 'dark'
? element[2]
? `img/index/integration/icons/${element[2]}.svg`
: `img/index/integration/icons/${element[0]}.svg`
Expand Down
8 changes: 6 additions & 2 deletions apps/documentation/src/components/index/powered/powered.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
import Link from '@mui/material/Link';

const Powered = (props) => {
const { isDarkTheme } = useColorMode();
const { colorMode } = useColorMode();
return (
<div className={styles.container}>
<div className={styles.containerTitle}>
{' '}
<h2 className={`${styles.title}`}>
More features powered by{' '}
<img
src={isDarkTheme ? 'img/index/powered/luos.svg' : 'img/index/powered/luos-dark.svg'}
src={
colorMode === 'dark'
? 'img/index/powered/luos.svg'
: 'img/index/powered/luos-dark.svg'
}
style={{ verticalAlign: 'middle', width: '100px' }}
alt="luos-dark"
/>
Expand Down

0 comments on commit 366928e

Please sign in to comment.