mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(ci): eslint + prettier → biome (#325)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { SupportedFramework, SupportedStyle } from '@/types/docs';
|
||||
import { useEffect } from 'react';
|
||||
import { currentFramework as frameworkStore, currentStyle as styleStore } from '@/stores/preferences';
|
||||
import type { SupportedFramework, SupportedStyle } from '@/types/docs';
|
||||
|
||||
interface PreferenceUpdaterProps<F extends SupportedFramework = SupportedFramework> {
|
||||
currentFramework: F;
|
||||
@@ -13,11 +13,14 @@ interface PreferenceUpdaterProps<F extends SupportedFramework = SupportedFramewo
|
||||
* It updates the nanostore whenever framework or style from URL changes.
|
||||
* PreferenceSync handles persisting to cookies.
|
||||
*/
|
||||
export function PreferenceUpdater<F extends SupportedFramework = SupportedFramework>({ currentFramework, currentStyle }: PreferenceUpdaterProps<F>) {
|
||||
export function PreferenceUpdater<F extends SupportedFramework = SupportedFramework>({
|
||||
currentFramework,
|
||||
currentStyle,
|
||||
}: PreferenceUpdaterProps<F>) {
|
||||
useEffect(() => {
|
||||
frameworkStore.set(currentFramework);
|
||||
styleStore.set(currentStyle);
|
||||
}, [currentFramework, currentStyle]);
|
||||
|
||||
return <></>;
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user