Skip to content

Commit

Permalink
fix: files encode uri
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Oct 17, 2023
1 parent c4aafc6 commit 5bf282a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion apps/renterd/contexts/files/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function useFilesMain() {

// [bucket, key, directory]
const activeDirectory = useMemo<FullPathSegments>(
() => (router.query.path as FullPathSegments).map(decodeURIComponent) || [],
() =>
((router.query.path || []) as FullPathSegments).map(decodeURIComponent),
[router.query.path]
)

Expand Down
21 changes: 12 additions & 9 deletions libs/design-system/src/components/LoadingDots.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { cx } from 'class-variance-authority'
import { forwardRef } from 'react'

export function LoadingDots({ className }: { className?: string }) {
return (
<div className={cx('flex gap-1 items-center', className)}>
<Dot />
<Dot />
<Dot />
</div>
)
}
export const LoadingDots = forwardRef<HTMLDivElement, { className?: string }>(
({ className }, ref) => {
return (
<div ref={ref} className={cx('flex gap-1 items-center', className)}>
<Dot />
<Dot />
<Dot />
</div>
)
}
)

function Dot() {
return (
Expand Down

0 comments on commit 5bf282a

Please sign in to comment.