Refactor account handling to improve performance
This commit dates the transition from a global user session to individual account handling based on user ID. The transition was made across several components, notably the account settings, icons, and selector. This change improves performance by reducing unnecessary requests and ensures more accurate data handling. The commit also includes some cleanups and minor fixes spread across different components.
This commit is contained in:
@@ -19,7 +19,7 @@ const features = {
|
||||
|
||||
export function ProfileAccountDropdownContainer(props: {
|
||||
collapsed: boolean;
|
||||
user: User | null;
|
||||
user: User;
|
||||
|
||||
account?: {
|
||||
id: string | null;
|
||||
@@ -29,7 +29,7 @@ export function ProfileAccountDropdownContainer(props: {
|
||||
}) {
|
||||
const signOut = useSignOut();
|
||||
const user = useUser(props.user);
|
||||
const userData = user.data ?? props.user ?? null;
|
||||
const userData = user.data as User;
|
||||
|
||||
return (
|
||||
<div className={props.collapsed ? '' : 'w-full'}>
|
||||
|
||||
Reference in New Issue
Block a user