Skip to content

Commit

Permalink
docs: explain the User component is used for rendering both the logge…
Browse files Browse the repository at this point in the history
…d-in and other users
  • Loading branch information
tomcur committed Jan 19, 2024
1 parent 2c68047 commit 6c8b6bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions astroplant-frontend/src/scenes/user/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6c8b6bc

Please sign in to comment.