v3: added onboarding email on account creation
This commit is contained in:
@@ -2,7 +2,12 @@ import { useLocation, useNavigate } from "react-router";
|
||||
import { useAuth } from "../hooks/useAuth.ts";
|
||||
|
||||
export type FeedTab = "hot" | "new" | "journal" | "followed";
|
||||
export const VALID_TABS = new Set<string>(["hot", "new", "journal", "followed"]);
|
||||
export const VALID_TABS = new Set<string>([
|
||||
"hot",
|
||||
"new",
|
||||
"journal",
|
||||
"followed",
|
||||
]);
|
||||
|
||||
export function FeedTabBar() {
|
||||
const location = useLocation();
|
||||
|
||||
@@ -8,7 +8,9 @@ interface PageShellProps {
|
||||
centerSlot?: ReactNode;
|
||||
}
|
||||
|
||||
export function PageShell({ children, centered = false, centerSlot }: PageShellProps) {
|
||||
export function PageShell(
|
||||
{ children, centered = false, centerSlot }: PageShellProps,
|
||||
) {
|
||||
return (
|
||||
<div className="page-shell">
|
||||
<AppHeader centerSlot={centerSlot ?? <SearchBar />} />
|
||||
|
||||
@@ -14,7 +14,7 @@ export function SearchBar({ collapsible = false }: SearchBarProps) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
if (expanded) inputRef.current?.focus();
|
||||
if (collapsible && expanded) inputRef.current?.focus();
|
||||
}, [expanded]);
|
||||
|
||||
function handleIconClick() {
|
||||
@@ -47,7 +47,9 @@ export function SearchBar({ collapsible = false }: SearchBarProps) {
|
||||
|
||||
return (
|
||||
<form
|
||||
className={`search-bar${collapsible ? " search-bar--collapsible" : ""}${expanded ? " search-bar--expanded" : ""}`}
|
||||
className={`search-bar${collapsible ? " search-bar--collapsible" : ""}${
|
||||
expanded ? " search-bar--expanded" : ""
|
||||
}`}
|
||||
onSubmit={handleSubmit}
|
||||
role="search"
|
||||
>
|
||||
|
||||
@@ -174,7 +174,9 @@ export const TextEditor = forwardRef<TextEditorHandle, TextEditorProps>(
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`mention-textarea-wrap${dragOver ? " mention-textarea-wrap--dragover" : ""}`}
|
||||
className={`mention-textarea-wrap${
|
||||
dragOver ? " mention-textarea-wrap--dragover" : ""
|
||||
}`}
|
||||
>
|
||||
<textarea
|
||||
ref={textareaRef}
|
||||
|
||||
@@ -10,7 +10,9 @@ export function UserMenu({ user }: { user: User }) {
|
||||
useEffect(() => {
|
||||
if (!open) return;
|
||||
function onMouseDown(e: MouseEvent) {
|
||||
if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);
|
||||
if (ref.current && !ref.current.contains(e.target as Node)) {
|
||||
setOpen(false);
|
||||
}
|
||||
}
|
||||
function onKeyDown(e: KeyboardEvent) {
|
||||
if (e.key === "Escape") setOpen(false);
|
||||
|
||||
Reference in New Issue
Block a user