fix: Clean up custom css when dashboard unmounted (#19342)
* clean up custom css when dashboard unmounted * resolve comment
This commit is contained in:
parent
634693b270
commit
a88fa8910d
|
|
@ -231,7 +231,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
|
|||
}, [dashboard_title]);
|
||||
|
||||
useEffect(() => {
|
||||
if (css) {
|
||||
if (typeof css === 'string') {
|
||||
// returning will clean up custom css
|
||||
// when dashboard unmounts or changes
|
||||
return injectCustomCss(css);
|
||||
|
|
|
|||
Loading…
Reference in New Issue