Skip to content

Commit

Permalink
#7308 fix : use "hidden" css property to toggle b/w Login & Forgot Pa…
Browse files Browse the repository at this point in the history
…ssword (#7323)

* fix : use "hidden" css property to toggle b/w Login & Forgot Password page

* suggestions from code review

---------

Co-authored-by: Vibhu1710 <vibhu@tartanhq.com>
Co-authored-by: rithviknishad <mail@rithviknishad.dev>
  • Loading branch information
3 people committed May 7, 2024
1 parent 9a1c337 commit 02d9b90
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/Components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ReactMarkdown from "react-markdown";
import rehypeRaw from "rehype-raw";
import { useAuthContext } from "../../Common/hooks/useAuthUser";
import FiltersCache from "../../Utils/FiltersCache";
import { classNames } from "../../Utils/utils";

export const Login = (props: { forgot?: boolean }) => {
const { signIn } = useAuthContext();
Expand Down Expand Up @@ -276,12 +277,10 @@ export const Login = (props: { forgot?: boolean }) => {

<div className="relative flex h-full w-full items-center">
<div
className={
"w-full transition-all " +
(!forgotPassword
? "visible -translate-x-0 opacity-100"
: "invisible -translate-x-5 opacity-0")
}
className={classNames(
"w-full transition-all",
forgotPassword && "hidden",
)}
>
<div className="mb-8 w-[300px] text-4xl font-black text-primary-600">
{t("auth_login_title")}
Expand Down Expand Up @@ -353,12 +352,10 @@ export const Login = (props: { forgot?: boolean }) => {
</div>

<div
className={
"absolute w-full transition-all " +
(forgotPassword
? "visible translate-x-0 opacity-100"
: "invisible translate-x-5 opacity-0")
}
className={classNames(
"w-full transition-all",
!forgotPassword && "hidden",
)}
>
<button
onClick={() => {
Expand Down

0 comments on commit 02d9b90

Please sign in to comment.