This commit is contained in:
Martti Malmi
2023-11-21 17:41:37 +02:00
parent 8e5acc3ea5
commit c5d22b84be
3 changed files with 23 additions and 12 deletions

View File

@ -10,7 +10,7 @@ import Icon from "@/Icons/Icon";
import { useNoteCreator } from "@/State/NoteCreator";
import { NoteCreator } from "./NoteCreator";
export const NoteCreatorButton = ({ className }: { className?: string }) => {
export const NoteCreatorButton = ({ className, alwaysShow }: { className?: string, alwaysShow?: boolean }) => {
const buttonRef = useRef<HTMLButtonElement>(null);
const location = useLocation();
const { readonly } = useLogin(s => ({ readonly: s.readonly }));
@ -27,6 +27,9 @@ export const NoteCreatorButton = ({ className }: { className?: string }) => {
});
const shouldHideNoteCreator = useMemo(() => {
if (alwaysShow) {
return false;
}
const isReply = replyTo && show;
const hideOn = [
"/settings",