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)
|
const [experimentalEnabed, setExperimentalEnabled] = useState<boolean>(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Global experimental feature is disabled
|
setExperimentalEnabled(
|
||||||
let globalFeatureEnabled = false
|
localStorage.getItem(EXPERIMENTAL_FEATURE_ENABLED) === 'true'
|
||||||
if (localStorage.getItem(EXPERIMENTAL_FEATURE_ENABLED) !== 'true') {
|
)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
globalFeatureEnabled = true
|
|
||||||
}
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const setExperimentalFeature = (on: boolean) => {
|
const setExperimentalFeature = (on: boolean) => {
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import { ChatCompletionRole, MessageStatus, ThreadMessage } from '@janhq/core'
|
|||||||
|
|
||||||
import hljs from 'highlight.js'
|
import hljs from 'highlight.js'
|
||||||
|
|
||||||
import { MoreVertical } from 'lucide-react'
|
|
||||||
import { Marked } from 'marked'
|
import { Marked } from 'marked'
|
||||||
|
|
||||||
import { markedHighlight } from 'marked-highlight'
|
import { markedHighlight } from 'marked-highlight'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user