More fixes

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
Josh-Cena 2021-06-17 17:47:03 +08:00
parent 6d3d416f58
commit c7c833fe77
No known key found for this signature in database
GPG key ID: C37145B818BDB68F
16 changed files with 59 additions and 32 deletions

View file

@ -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'];