mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-22 19:17:46 +02:00
More fixes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
6d3d416f58
commit
c7c833fe77
16 changed files with 59 additions and 32 deletions
|
@ -21,10 +21,10 @@ const ThemedImage = (props: Props): JSX.Element => {
|
|||
|
||||
type SourceName = keyof Props['sources'];
|
||||
|
||||
const clientTheme: SourceName[] = isDarkTheme ? ['dark'] : ['light'];
|
||||
|
||||
const renderedSourceNames: SourceName[] = isClient
|
||||
? isDarkTheme
|
||||
? ['dark']
|
||||
: ['light']
|
||||
? clientTheme
|
||||
: // We need to render both images on the server to avoid flash
|
||||
// See https://github.com/facebook/docusaurus/pull/3730
|
||||
['light', 'dark'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue