mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 01:51:36 -04:00
fix: move dark mode and transparent body hook into renderer
These hooks are only necessary for the document and simple renderer. The slideshow handles theming itself. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
e1a953c5bf
commit
efac46858c
4 changed files with 27 additions and 9 deletions
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* Makes the HTML body transparent.
|
||||
*/
|
||||
export const useTransparentBodyBackground = () => {
|
||||
useEffect(() => {
|
||||
document.body.classList.add('bg-transparent')
|
||||
return () => document.body.classList.remove('bg-transparent')
|
||||
}, [])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue