Skip to content

Commit

Permalink
fix: prevent accidentally rendering the community channel qr-code wit…
Browse files Browse the repository at this point in the history
…h nil while closing the share-qr modal
  • Loading branch information
seanstrom committed Apr 25, 2024
1 parent efc96c8 commit 43af11f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
(defn view
[]
(fn []
(let [{:keys [url chat-id]} (rf/sub [:get-screen-params])
(let [params (rf/sub [:get-screen-params])
;; NOTE(seanstrom): We need to store these screen params for when the modal closes
;; because the screen params will be cleared.
{:keys [url chat-id]} @(rn/use-ref-atom params)
{:keys [color emoji chat-name]} (rf/sub [:chats/community-channel-ui-details-by-id chat-id])
on-share-community-channel (rn/use-callback
#(rf/dispatch
Expand Down

0 comments on commit 43af11f

Please sign in to comment.