Skip to content

Commit

Permalink
fix: downgrade vitest
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Sep 28, 2024
1 parent 4eb47d4 commit 2f15900
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 72 deletions.
3 changes: 2 additions & 1 deletion apps/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"fake-indexeddb": "6.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.6.2"
"typescript": "^5.6.2",
"vitest": "2.0"
}
}
10 changes: 6 additions & 4 deletions apps/renderer/src/modules/profile/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,20 @@ export const usePresentUserProfileModal = (variant: Variant = "dialog") => {
return useCallback(
(userId: string | undefined, overrideVariant?: Variant) => {
if (!userId) return
const finalVariant = overrideVariant || variant
present({
title: "User Profile",
content: () =>
createElement(UserProfileModalContent, {
userId,
variant: overrideVariant || variant,
variant: finalVariant,
}),
CustomModalComponent: PlainModal,
clickOutsideToDismiss: true,
modal: variant === "dialog",
overlay: variant === "dialog",
modalContainerClassName: variant === "drawer" ? "right-4 left-[auto] top-4 bottom-4" : "",
modal: finalVariant === "dialog",
overlay: finalVariant === "dialog",
modalContainerClassName:
finalVariant === "drawer" ? "right-4 left-[auto] top-4 bottom-4" : "",
})
},
[present, variant],
Expand Down
122 changes: 55 additions & 67 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f15900

Please sign in to comment.