From add5093fa3e9a4d1eb76094f087c0d07e554f7ee Mon Sep 17 00:00:00 2001 From: grngxd <36968271+grngxd@users.noreply.github.com> Date: Sat, 10 Aug 2024 00:15:24 +0100 Subject: [PATCH] a --- web/src/components/user/User.tsx | 36 ++++++++------------------------ 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/web/src/components/user/User.tsx b/web/src/components/user/User.tsx index 362f6a9..b719019 100644 --- a/web/src/components/user/User.tsx +++ b/web/src/components/user/User.tsx @@ -1,5 +1,4 @@ -import { component$, useSignal, useVisibleTask$ } from "@builder.io/qwik"; -import { animate } from "motion"; +import { component$, useSignal } from "@builder.io/qwik"; import { UserType } from "~/lib/types"; import { LucideUsers } from "../icons/lucide/LucideUsers"; @@ -12,43 +11,26 @@ interface UserProps { export default component$((props: UserProps) => { const visible = useSignal(false); - const accountSwitcher = useSignal(); - const animating = useSignal(false); - - useVisibleTask$(({ track }) => { - track(() => visible.value); - if (accountSwitcher.value && !animating.value) { - animating.value = true; - animate(accountSwitcher.value, { - opacity: visible.value ? 1 : 0, - transform: visible.value ? "translateY(0)" : "translateY(10px)" - }, { - duration: 0.3, - }); - animating.value = false - } - }); return (
-
+
Account Switcher
-
+
avatar
-

{props.user.displayName}

-

- @ - +

{props.user.displayName}

+

+ @ + {props.user.userName} {props.action}

@@ -58,7 +40,7 @@ export default component$((props: UserProps) => { {props.accountSwitcher && (