-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1150] fix(UI): Fix details comment error and improve components che…
…ck (#1334) ### What changes were proposed in this pull request? The error occurred due to the failure to locate the correct variable object and its properties. Resolve: use an empty string as a substitute. Extra: 1. Initialize and reset the tree list when the metalake page is loaded. 2. Improve rendering of components check. ### Why are the changes needed? Fix: #1150 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? N/A Co-authored-by: CHEYNE <[email protected]>
- Loading branch information
1 parent
b17edcd
commit 5ca7003
Showing
5 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright 2023 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
|
||
import { useEffect, useState, Fragment } from 'react' | ||
|
||
const ClientOnly = ({ children, ...delegated }) => { | ||
const [hasMounted, setHasMounted] = useState(false) | ||
|
||
useEffect(() => { | ||
setHasMounted(true) | ||
}, []) | ||
|
||
if (!hasMounted) return null | ||
|
||
return <Fragment {...delegated}>{children}</Fragment> | ||
} | ||
|
||
export default ClientOnly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters