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 { createFileUploader } from '@solid-primitives/upload'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import deepEqual from 'fast-deep-equal'
|
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 { createStore } from 'solid-js/store'
|
||||||
|
|
||||||
import { useConfirm } from '../../context/confirm'
|
import { useConfirm } from '../../context/confirm'
|
||||||
|
@ -156,12 +167,15 @@ export const ProfileSettings = () => {
|
||||||
onCleanup(() => window.removeEventListener('beforeunload', handleBeforeUnload))
|
onCleanup(() => window.removeEventListener('beforeunload', handleBeforeUnload))
|
||||||
})
|
})
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(
|
||||||
if (!deepEqual(form, prevForm)) {
|
on(
|
||||||
setIsFloatingPanelVisible(true)
|
() => deepEqual(form, prevForm),
|
||||||
}
|
() => {
|
||||||
})
|
setIsFloatingPanelVisible(!deepEqual(form, prevForm))
|
||||||
|
},
|
||||||
|
{ defer: true }
|
||||||
|
),
|
||||||
|
)
|
||||||
const handleDeleteSocialLink = (link) => {
|
const handleDeleteSocialLink = (link) => {
|
||||||
updateFormField('links', link, true)
|
updateFormField('links', link, true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user