fix: feature flag does not cached
This commit is contained in:
parent
5ae319db33
commit
26587e8ab0
@ -22,12 +22,9 @@ export default function FeatureToggleWrapper({
|
||||
const [experimentalEnabed, setExperimentalEnabled] = useState<boolean>(false)
|
||||
|
||||
useEffect(() => {
|
||||
// Global experimental feature is disabled
|
||||
let globalFeatureEnabled = false
|
||||
if (localStorage.getItem(EXPERIMENTAL_FEATURE_ENABLED) !== 'true') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
globalFeatureEnabled = true
|
||||
}
|
||||
setExperimentalEnabled(
|
||||
localStorage.getItem(EXPERIMENTAL_FEATURE_ENABLED) === 'true'
|
||||
)
|
||||
}, [])
|
||||
|
||||
const setExperimentalFeature = (on: boolean) => {
|
||||
|
||||
@ -5,7 +5,6 @@ import { ChatCompletionRole, MessageStatus, ThreadMessage } from '@janhq/core'
|
||||
|
||||
import hljs from 'highlight.js'
|
||||
|
||||
import { MoreVertical } from 'lucide-react'
|
||||
import { Marked } from 'marked'
|
||||
|
||||
import { markedHighlight } from 'marked-highlight'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user