From 6c8b6bc4c7771575a83a7d142947e15290a7409d Mon Sep 17 00:00:00 2001 From: Thomas Churchman Date: Fri, 19 Jan 2024 17:14:53 +0100 Subject: [PATCH] docs: explain the User component is used for rendering both the logged-in and other users --- astroplant-frontend/src/scenes/user/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/astroplant-frontend/src/scenes/user/index.tsx b/astroplant-frontend/src/scenes/user/index.tsx index 09003e0..dcfbc90 100644 --- a/astroplant-frontend/src/scenes/user/index.tsx +++ b/astroplant-frontend/src/scenes/user/index.tsx @@ -18,6 +18,11 @@ import commonStyle from "~/Common.module.css"; import style from "./index.module.css"; export default function User({ username }: { username: string }) { + // This component is used to render both the user profile of the logged-in + // user as well as profiles of other users. If the profile of the logged-in + // user is rendered, additional options are displayed, such as the ability to + // edit the profile. + const { username: meUsername } = useAppSelector(selectMe); const isMe = username === meUsername;