From 6b00ee2dadfaa2e9b34315b9b65e24279e238a4b Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 6 Sep 2024 16:54:00 +0300 Subject: [PATCH] Indicate that these component are client only see: https://github.com/mui/material-ui/issues/34905 --- packages/commons-ui-core/src/ImageButton/ImageButton.js | 8 ++------ packages/commons-ui-core/src/NavBar/NavBar.js | 2 ++ packages/commons-ui-core/src/NavList/NavList.js | 2 ++ .../commons-ui-core/src/RichTypography/RichTypography.js | 8 ++------ packages/commons-ui-core/src/Section/Section.js | 8 +++----- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/packages/commons-ui-core/src/ImageButton/ImageButton.js b/packages/commons-ui-core/src/ImageButton/ImageButton.js index 2a1e8e8ae..e0666c0e9 100644 --- a/packages/commons-ui-core/src/ImageButton/ImageButton.js +++ b/packages/commons-ui-core/src/ImageButton/ImageButton.js @@ -1,3 +1,5 @@ +"use client"; + import ButtonBase from "@mui/material/ButtonBase"; import { styled } from "@mui/material/styles"; import PropTypes from "prop-types"; @@ -53,10 +55,4 @@ ImageButton.propTypes = { width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), }; -ImageButton.defaultProps = { - height: undefined, - src: undefined, - width: undefined, -}; - export default ImageButton; diff --git a/packages/commons-ui-core/src/NavBar/NavBar.js b/packages/commons-ui-core/src/NavBar/NavBar.js index 5247b7bad..429e01e25 100644 --- a/packages/commons-ui-core/src/NavBar/NavBar.js +++ b/packages/commons-ui-core/src/NavBar/NavBar.js @@ -1,3 +1,5 @@ +"use client"; + import AppBar from "@mui/material/AppBar"; import { styled } from "@mui/material/styles"; import Toolbar from "@mui/material/Toolbar"; diff --git a/packages/commons-ui-core/src/NavList/NavList.js b/packages/commons-ui-core/src/NavList/NavList.js index e3e16cf42..93d8a9e7a 100644 --- a/packages/commons-ui-core/src/NavList/NavList.js +++ b/packages/commons-ui-core/src/NavList/NavList.js @@ -1,3 +1,5 @@ +"use client"; + import { styled } from "@mui/material/styles"; import PropTypes from "prop-types"; import React from "react"; diff --git a/packages/commons-ui-core/src/RichTypography/RichTypography.js b/packages/commons-ui-core/src/RichTypography/RichTypography.js index 1cc6dc4ec..bb87e8b84 100644 --- a/packages/commons-ui-core/src/RichTypography/RichTypography.js +++ b/packages/commons-ui-core/src/RichTypography/RichTypography.js @@ -1,3 +1,5 @@ +"use client"; + import { styled } from "@mui/material/styles"; import Typography from "@mui/material/Typography"; import PropTypes from "prop-types"; @@ -65,10 +67,4 @@ RichTypography.propTypes = { component: PropTypes.elementType, }; -RichTypography.defaultProps = { - children: undefined, - html: undefined, - component: undefined, -}; - export default RichTypography; diff --git a/packages/commons-ui-core/src/Section/Section.js b/packages/commons-ui-core/src/Section/Section.js index 2d083d100..adfed692c 100644 --- a/packages/commons-ui-core/src/Section/Section.js +++ b/packages/commons-ui-core/src/Section/Section.js @@ -1,3 +1,5 @@ +"use client"; + import { Container } from "@mui/material"; import { styled } from "@mui/material/styles"; import PropTypes from "prop-types"; @@ -37,7 +39,7 @@ const Section = React.forwardRef(function Section(props, ref) { return (