fix (dashboard): paused application cannot read null project name (#3117)
### **User description** Fixes the occasional error `Cannot read properties of null (reading 'name') when you open a page inside a paused project  ___ ### **PR Type** Bug fix ___ ### **Description** - Fix error when reading project name in paused application - Update ApplicationPaused component to handle null project - Add optional chaining to prevent null reference errors - Improve error handling for paused projects in dashboard ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>ApplicationPaused.tsx</strong><dd><code>Add null checks for project name in ApplicationPaused component</code></dd></summary> <hr> dashboard/src/features/orgs/projects/common/components/ApplicationPaused/ApplicationPaused.tsx <li>Added optional chaining (<code>?.</code>) to <code>project.name</code> references<br> <li> Updated modal title and description to handle potential null project </details> </td> <td><a href="https://github.com/nhost/nhost/pull/3117/files#diff-14afdf5ac20f058c26563a6992a3751f11cf173eec27206001262b5d1b3b979f">+2/-2</a> </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>wise-chefs-drum.md</strong><dd><code>Add changeset for paused project banner fix</code> </dd></summary> <hr> .changeset/wise-chefs-drum.md <li>Added changeset file for version bump and change description<br> <li> Described fix for paused project banner issue </details> </td> <td><a href="https://github.com/nhost/nhost/pull/3117/files#diff-dddc3d3dd31a1cb69106c6acad798c2201016cffb11cb8447e0696563838300c">+5/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information
This commit is contained in:
5
.changeset/wise-chefs-drum.md
Normal file
5
.changeset/wise-chefs-drum.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@nhost/dashboard': minor
|
||||
---
|
||||
|
||||
fix: paused project banner cannot read null project name
|
||||
@@ -36,8 +36,8 @@ export default function ApplicationPaused() {
|
||||
>
|
||||
<RemoveApplicationModal
|
||||
close={() => setShowDeletingModal(false)}
|
||||
title={`Remove project ${project.name}?`}
|
||||
description={`The project ${project.name} will be removed. All data will be lost and there will be no way to
|
||||
title={`Remove project ${project?.name}?`}
|
||||
description={`The project ${project?.name} will be removed. All data will be lost and there will be no way to
|
||||
recover the app once it has been deleted.`}
|
||||
className="z-50"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user