Skip to content

Commit

Permalink
Added another type instead of type any
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltovbin committed Aug 11, 2024
1 parent d58be42 commit 03238bc
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 303 deletions.
30 changes: 15 additions & 15 deletions src/view/components/buttons/GoogleLoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import { useLanguage } from "@/controllers/hooks/useLanguages";
import useDirection from "@/controllers/hooks/useDirection";

export default function GoogleLoginButton() {
const direction = useDirection();
const { t } = useLanguage();
const direction = useDirection();
const { t } = useLanguage();

return (
<button
className={`${styles.googleLogin} ${direction === 'row' ? styles.ltr : styles.rtl}`}
onClick={googleLogin}>
<img
src={direction === "row-reverse" ? moreRight : moreLeft}
alt="login-with-google"
/>
{t("Sign up with")}
<img src={googleLogo} alt="login with google" />
</button>
);
return (
<button
className={`${styles.googleLogin} ${direction === "row" ? styles.ltr : styles.rtl}`}
onClick={googleLogin}
>
<img
src={direction === "row-reverse" ? moreRight : moreLeft}
alt="login-with-google"
/>
{t("Sign up with")}
<img src={googleLogo} alt="login with google" />
</button>
);
}
10 changes: 2 additions & 8 deletions src/view/components/edit/EditTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
ChangeEvent,
Dispatch,
FC,
SetStateAction,
useState
} from "react";
import { ChangeEvent, Dispatch, FC, SetStateAction, useState } from "react";

// Third party
import { Statement } from "delib-npm";
Expand Down Expand Up @@ -39,7 +33,7 @@ const EditTitle: FC<Props> = ({
}) => {
const [text, setText] = useState(statement?.statement || "");
const [title, setTitle] = useState(getTitle(statement) || "");
const textareaRef = useAutoFocus(isEdit)
const textareaRef = useAutoFocus(isEdit);

if (!statement) return null;

Expand Down
Loading

0 comments on commit 03238bc

Please sign in to comment.