fix: do not sync activePattern between tabs
+ only deselect activePattern if code in url differs
This commit is contained in:
parent
1f16ebc5b2
commit
faaed61384
3 changed files with 36 additions and 14 deletions
|
|
@ -10,6 +10,7 @@ import {
|
|||
newUserPattern,
|
||||
renameActivePattern,
|
||||
setActivePattern,
|
||||
useActivePattern,
|
||||
useSettings,
|
||||
} from '../../settings.mjs';
|
||||
import * as tunes from '../tunes.mjs';
|
||||
|
|
@ -19,7 +20,8 @@ function classNames(...classes) {
|
|||
}
|
||||
|
||||
export function PatternsTab({ context }) {
|
||||
const { userPatterns, activePattern } = useSettings();
|
||||
const { userPatterns } = useSettings();
|
||||
const activePattern = useActivePattern();
|
||||
const isExample = useMemo(() => activePattern && !!tunes[activePattern], [activePattern]);
|
||||
return (
|
||||
<div className="px-4 w-full dark:text-white text-stone-900 space-y-4 pb-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue