mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Only set data attr if there are shortcuts
This commit is contained in:
parent
b1030cb38a
commit
b116cbfe8c
1 changed files with 4 additions and 2 deletions
|
@ -184,9 +184,11 @@ function App() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const $app = document.getElementById('app');
|
const $app = document.getElementById('app');
|
||||||
if ($app) {
|
if ($app) {
|
||||||
$app.dataset.shortcutsViewMode = snapStates.settings.shortcutsViewMode;
|
$app.dataset.shortcutsViewMode = snapStates.shortcuts?.length
|
||||||
|
? snapStates.settings.shortcutsViewMode
|
||||||
|
: '';
|
||||||
}
|
}
|
||||||
}, [snapStates.settings.shortcutsViewMode]);
|
}, [snapStates.shortcuts, snapStates.settings.shortcutsViewMode]);
|
||||||
|
|
||||||
// Add/Remove cloak class to body
|
// Add/Remove cloak class to body
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Reference in a new issue