Skip to content

Commit

Permalink
revert few unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi committed Dec 18, 2024
1 parent 86fc370 commit e1c6022
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { mergeRefs, useMergedRef } from '#/utilities/mergeRefs'
import { forwardRef } from '#/utilities/react'
import type { VariantProps } from '#/utilities/tailwindVariants'
import { tv } from '#/utilities/tailwindVariants'
import { useStore } from '#/utilities/zustand'
import type { Variants } from 'framer-motion'
import { motion } from 'framer-motion'
import type {
Expand All @@ -19,7 +20,6 @@ import type {
RefAttributes,
} from 'react'
import invariant from 'tiny-invariant'
import { useStore } from '#/utilities/zustand'
import type { FieldPath, FieldStateProps, TSchema, UseFormRegisterReturn } from '../Form'
import { Form } from '../Form'
import { Text } from '../Text'
Expand Down
12 changes: 7 additions & 5 deletions app/gui/src/dashboard/providers/DriveProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ export function useDriveStore() {
/** The category of the Asset Table. */
export function useCategory() {
const store = useDriveStore()
return useStore(store, (state) => state.category)
return useStore(store, (state) => state.category, { unsafeEnableTransition: true })
}

/** A function to set the category of the Asset Table. */
export function useSetCategory() {
const store = useDriveStore()
return useStore(store, (state) => state.setCategory)
return useStore(store, (state) => state.setCategory, { unsafeEnableTransition: true })
}

/** The target directory of the Asset Table selection. */
Expand Down Expand Up @@ -231,7 +231,9 @@ export function useExpandedDirectoryIds() {
/** A function to set the expanded directoyIds in the Asset Table. */
export function useSetExpandedDirectoryIds() {
const store = useDriveStore()
const privateSetExpandedDirectoryIds = useStore(store, (state) => state.setExpandedDirectoryIds)
const privateSetExpandedDirectoryIds = useStore(store, (state) => state.setExpandedDirectoryIds, {
unsafeEnableTransition: true,
})
return useEventCallback((expandedDirectoryIds: readonly DirectoryId[]) => {
React.startTransition(() => {
privateSetExpandedDirectoryIds(expandedDirectoryIds)
Expand All @@ -254,13 +256,13 @@ export function useSetSelectedKeys() {
/** The visually selected keys in the Asset Table. */
export function useVisuallySelectedKeys() {
const store = useDriveStore()
return useStore(store, (state) => state.selectedKeys)
return useStore(store, (state) => state.selectedKeys, { unsafeEnableTransition: true })
}

/** A function to set the visually selected keys in the Asset Table. */
export function useSetVisuallySelectedKeys() {
const store = useDriveStore()
return useStore(store, (state) => state.setVisuallySelectedKeys)
return useStore(store, (state) => state.setVisuallySelectedKeys, { unsafeEnableTransition: true })
}

/** Toggle whether a specific directory is expanded. */
Expand Down
12 changes: 11 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,15 @@
"target": "ES2022",
"jsx": "react-jsx"
},
"exclude": ["tools", "node_modules", "lib", "engine", "test", "dist", "docs", "bazel-*", "build_tools"]
"exclude": [
"tools",
"node_modules",
"lib",
"engine",
"test",
"dist",
"docs",
"bazel-*",
"build_tools"
]
}

0 comments on commit e1c6022

Please sign in to comment.