Fix profile settings Is Floating PanelVisible
This commit is contained in:
parent
b9591d7364
commit
b752357224
|
@ -1,7 +1,18 @@
|
|||
import { createFileUploader } from '@solid-primitives/upload'
|
||||
import { clsx } from 'clsx'
|
||||
import deepEqual from 'fast-deep-equal'
|
||||
import { For, Match, Show, Switch, createEffect, createSignal, lazy, onCleanup, onMount } from 'solid-js'
|
||||
import {
|
||||
For,
|
||||
Match,
|
||||
Show,
|
||||
Switch,
|
||||
createEffect,
|
||||
createSignal,
|
||||
lazy,
|
||||
onCleanup,
|
||||
onMount,
|
||||
on
|
||||
} from "solid-js";
|
||||
import { createStore } from 'solid-js/store'
|
||||
|
||||
import { useConfirm } from '../../context/confirm'
|
||||
|
@ -156,12 +167,15 @@ export const ProfileSettings = () => {
|
|||
onCleanup(() => window.removeEventListener('beforeunload', handleBeforeUnload))
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
if (!deepEqual(form, prevForm)) {
|
||||
setIsFloatingPanelVisible(true)
|
||||
}
|
||||
})
|
||||
|
||||
createEffect(
|
||||
on(
|
||||
() => deepEqual(form, prevForm),
|
||||
() => {
|
||||
setIsFloatingPanelVisible(!deepEqual(form, prevForm))
|
||||
},
|
||||
{ defer: true }
|
||||
),
|
||||
)
|
||||
const handleDeleteSocialLink = (link) => {
|
||||
updateFormField('links', link, true)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user