<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sayantan chakraborty</title>
    <description>The latest articles on DEV Community by sayantan chakraborty (@cadentic).</description>
    <link>https://dev.to/cadentic</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F927783%2F89c7311e-1030-4abf-b18c-ffe944d41cce.png</url>
      <title>DEV Community: sayantan chakraborty</title>
      <link>https://dev.to/cadentic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cadentic"/>
    <language>en</language>
    <item>
      <title>can anyone suggest an easiest way of using aws lex in nextjs?</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Tue, 27 Sep 2022 11:11:54 +0000</pubDate>
      <link>https://dev.to/cadentic/can-anyone-suggest-an-easiest-way-of-using-aws-lex-in-nextjs-4e4a</link>
      <guid>https://dev.to/cadentic/can-anyone-suggest-an-easiest-way-of-using-aws-lex-in-nextjs-4e4a</guid>
      <description>&lt;p&gt;can anyone suggest an easiest way of using aws lex in nextjs to create an automated chat box?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>nextjs</category>
      <category>aws</category>
    </item>
    <item>
      <title>it transit in like any menu or mega-menu (containerRef) easy pizzy === `it's pizza time`</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Tue, 27 Sep 2022 10:46:16 +0000</pubDate>
      <link>https://dev.to/cadentic/it-transit-in-like-any-menu-or-mega-menu-containerref-42i6</link>
      <guid>https://dev.to/cadentic/it-transit-in-like-any-menu-or-mega-menu-containerref-42i6</guid>
      <description>&lt;p&gt;lots of guys think simple popup would do; lot's guys think modal would do but I think a  is more generic way to achieve it ; however it is never ending saga.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as React from 'react';
import Box from '@mui/material/Box';
import Switch from '@mui/material/Switch';
import Paper from '@mui/material/Paper';
import Slide from '@mui/material/Slide';
import FormControlLabel from '@mui/material/FormControlLabel';
import { Card } from '@mui/material';

export default function SimpleSlide() {
  const [checked, setChecked] = React.useState(false);
  //const [checked, setChecked] = React.useState(false);
  const containerRef = React.useRef(null);
  const handleChange = () =&amp;gt; {
    setChecked((prev) =&amp;gt; !prev);
  };

  return (
    &amp;lt;Box sx={{ height: 'fit-content' }}&amp;gt;
      &amp;lt;Box sx={{ width: `fit-content` }} ref={containerRef}&amp;gt;
          &amp;lt;Box onClick={handleChange}&amp;gt;my hero &amp;lt;/Box&amp;gt;

        &amp;lt;Slide direction="up" container={containerRef.current} in={checked} mountOnEnter unmountOnExit&amp;gt;
      &amp;lt;Card sx={{ m: 1 }} elevation={1}&amp;gt;
    &amp;lt;Box  component="svg" sx={{ width: 100, height: 100 }}&amp;gt;
      &amp;lt;Box
        component="polygon"
        sx={{
          fill: (theme) =&amp;gt; theme.palette.common.red,
          stroke: (theme) =&amp;gt; theme.palette.divider,
          strokeWidth: 1,
        }}
        points="0,0 50,50, 100,100, 0,100"
      /&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt;
        &amp;lt;/Slide&amp;gt;
      &amp;lt;/Box&amp;gt;
    &amp;lt;/Box&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the code from this card and put you menu and menu item into this to achieve a mega menu&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Card sx={{ m: 1 }} elevation={1}&amp;gt;
    &amp;lt;Box  component="svg" sx={{ width: 100, height: 100 }}&amp;gt;
      &amp;lt;Box
        component="polygon"
        sx={{
          fill: (theme) =&amp;gt; theme.palette.common.red,
          stroke: (theme) =&amp;gt; theme.palette.divider,
          strokeWidth: 1,
        }}
        points="0,0 50,50, 100,100, 0,100"
      /&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://mui.com/material-ui/transitions/"&gt;Ref Link : it is world famous MUI ; it's back as it was never left us behind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But in a React Grid it seems little messy : still it does a job what it is meant to be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as React from 'react';
import PropTypes from 'prop-types';
import IconButton from '@mui/material/IconButton';
//import Grid from '@mui/material/Grid'; // Grid version 1
import Grid2 from '@mui/material/Unstable_Grid2';
import { styled, alpha } from '@mui/material/styles';
//import Image from '@mui/material/Image';
import { Slide, Popover, Grid, ClickAwayListener, Grow, Button, MenuList, ButtonGroup, Container, Toolbar, Typography, CssBaseline, Paper, Box, AppBar, Popper } from '@mui/material';
import MuiLink from '@mui/material/Link';
import Badge from '@mui/material/Badge';
import MenuItem from '@mui/material/MenuItem';
import Menu from '@mui/material/Menu';
import MenuIcon from '@mui/icons-material/Menu';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
import HomeIcon from '@mui/icons-material/Home';
import SearchIcon from '@mui/icons-material/Search';
import AccountCircle from '@mui/icons-material/AccountCircle';
import MailIcon from '@mui/icons-material/Mail';
import NotificationsIcon from '@mui/icons-material/Notifications';
import MoreIcon from '@mui/icons-material/MoreVert';
import useScrollTrigger from '@mui/material/useScrollTrigger';
import * as Colors from '@mui/material/colors';
import Image from 'next/image';
import ViewCompactRoundedIcon from '@mui/icons-material/ViewCompactRounded';
import BrokenComponantTabbes from '../src/BrokenComponantTabbes'


// Note that you normally won't need to set the window ref as useScrollTrigger
// will defau



const options = ['View Accounts', 'Contact Sales', 'Logedin users']




const ConditionalWrapper = ({ children, condition }) =&amp;gt; {
  return condition ? (
    &amp;lt;div&amp;gt;{children}&amp;lt;/div&amp;gt;
  ) : (
    children
  )
}


const Navigations = () =&amp;gt; {
  //const brown = brown[900];
  const [clicked, setClicked] = React.useState(false);
  const containerRef = React.useRef(null);
  const handleChange = () =&amp;gt; {
    setClicked((prev) =&amp;gt; !prev);
  };

  const [open, setOpen] = React.useState(false);
  const anchorRef = React.useRef(null);
  const [selectedIndex, setSelectedIndex] = React.useState(1);

  const handleClick = () =&amp;gt; {
    console.info(`You clicked ${options[selectedIndex]}`);
  };

  const handleMenuItemClick = (event, index) =&amp;gt; {
    setSelectedIndex(index);
    setOpen(false);
  };

  const handleToggle = () =&amp;gt; {
    setOpen((prevOpen) =&amp;gt; !prevOpen);
  };

  const handleClose = (event) =&amp;gt; {
    if (anchorRef.current &amp;amp;&amp;amp; anchorRef.current.contains(event.target)) {
      return;
    }

    setOpen(false);
  };

  const [anchorEl, setAnchorEl] = React.useState(null);
  const [mobileMoreAnchorEl, setMobileMoreAnchorEl] = React.useState(null);

  const isMenuOpen = Boolean(anchorEl);
  const isMobileMenuOpen = Boolean(mobileMoreAnchorEl);

  const handleProfileMenuOpen = (event) =&amp;gt; {
    setAnchorEl(event.currentTarget);
  };

  const handleMobileMenuClose = () =&amp;gt; {
    setMobileMoreAnchorEl(null);
  };

  const handleMenuClose = () =&amp;gt; {
    setAnchorEl(null);
    handleMobileMenuClose();
  };

  const handleMobileMenuOpen = (event) =&amp;gt; {
    setMobileMoreAnchorEl(event.currentTarget);
  };

  const menuId = 'primary-search-account-menu';
  const renderMenu = (
    &amp;lt;Menu
      anchorEl={anchorEl}
      anchorOrigin={{
        vertical: 'top',
        horizontal: 'right',
      }}
      id={menuId}
      keepMounted
      transformOrigin={{
        vertical: 'top',
        horizontal: 'right',
      }}
      open={isMenuOpen}
      onClose={handleMenuClose}
    &amp;gt;
      &amp;lt;MenuItem onClick={handleMenuClose}&amp;gt;Profile&amp;lt;/MenuItem&amp;gt;
      &amp;lt;MenuItem onClick={handleMenuClose}&amp;gt;My account&amp;lt;/MenuItem&amp;gt;
    &amp;lt;/Menu&amp;gt;
  );

  const mobileMenuId = 'primary-search-account-menu-mobile';
  const renderMobileMenu = (
    &amp;lt;Menu
      anchorEl={mobileMoreAnchorEl}
      anchorOrigin={{
        vertical: 'top',
        horizontal: 'right',
      }}
      id={mobileMenuId}
      keepMounted
      transformOrigin={{
        vertical: 'top',
        horizontal: 'right',
      }}
      open={isMobileMenuOpen}
      onClose={handleMobileMenuClose}
    &amp;gt;
    &amp;lt;/Menu&amp;gt;
  );


  return (
    &amp;lt;React.Fragment&amp;gt;
      &amp;lt;CssBaseline /&amp;gt;
      &amp;lt;Toolbar sx={{ zIndex: 1 }}&amp;gt;

        &amp;lt;Grid container spacing={7} sx={{ textAlign: "center", verticalAlign: "middle" }} &amp;gt;
          &amp;lt;Grid item xs sx={{ display: 'flex' }}  &amp;gt;
            &amp;lt;item&amp;gt; &amp;lt;Image src="/favicon.ico" alt="lol" width="260" height="50" padding='50 0 0' /&amp;gt; &amp;lt;/item&amp;gt;
          &amp;lt;/Grid&amp;gt;
        &amp;lt;/Grid&amp;gt;
      &amp;lt;/Toolbar&amp;gt;
      &amp;lt;AppBar position="sticky" maxWidth="sm" sx={{ verticalAlign: "middle", textAlign: 'center', display: 'flex', lineHeight: '10px', justifyContent: 'flex-end', top: 'auto', bottom: 7, px: 'auto', color: '#3a3632', fontcolor: '#faf8f7' }}&amp;gt;
        &amp;lt;Toolbar sx={{ display: 'flex' }} &amp;gt;
          &amp;lt;Grid container spacing={7} sx={{ textAlign: "center", verticalAlign: "middle" }} &amp;gt;

            &amp;lt;Grid item xs sx={{ display: 'flex' }}  &amp;gt;

              &amp;lt;item&amp;gt;
                &amp;lt;IconButton
                  size="large"
                  edge="start"
                  color="inherit"
                  aria-label="open drawer"
                  sx={{ mr: 2, hover: "outline - 2", pl: 2 }}
                &amp;gt;
                  &amp;lt;ViewCompactRoundedIcon sx={{ color: '#F1EFED' }} /&amp;gt;
                &amp;lt;/IconButton&amp;gt;
              &amp;lt;/item&amp;gt;
            &amp;lt;/Grid&amp;gt;
            &amp;lt;Grid item xs sx={{ color: '#F1EFED', ml: '5rem' }} ref={containerRef}&amp;gt;

              &amp;lt;item onClick={handleChange} &amp;gt; &amp;lt;Typography variant="h6" &amp;gt;Product&amp;lt;/Typography&amp;gt;

              &amp;lt;/item&amp;gt;

            &amp;lt;/Grid&amp;gt;

            &amp;lt;Grid item xs sx={{ color: '#F1EFED', ml: '-5rem' }}&amp;gt;
              &amp;lt;item&amp;gt; &amp;lt;Typography variant="h6" sx={{ color: '#F1EFED' }}&amp;gt;Service&amp;lt;/Typography&amp;gt;&amp;lt;/item&amp;gt;
            &amp;lt;/Grid&amp;gt;

            &amp;lt;Grid item xs sx={{ color: '#F1EFED', ml: '-5rem' }}&amp;gt;
              &amp;lt;item&amp;gt; &amp;lt;Typography variant="h6" &amp;gt;Development&amp;lt;/Typography&amp;gt;&amp;lt;/item&amp;gt;
            &amp;lt;/Grid&amp;gt;


            &amp;lt;Grid item xs sx={{ color: '#F1EFED', ml: '-5em' }}&amp;gt;
              &amp;lt;item&amp;gt; &amp;lt;Typography variant="h6" &amp;gt;Contact US&amp;lt;/Typography&amp;gt;&amp;lt;/item&amp;gt;
            &amp;lt;/Grid&amp;gt;

            &amp;lt;Grid item xs sx={{ color: '#F1EFED', ml: '-5rem' }}&amp;gt;
              &amp;lt;item&amp;gt; &amp;lt;Typography variant="h6" &amp;gt;About US&amp;lt;/Typography&amp;gt;&amp;lt;/item&amp;gt;
            &amp;lt;/Grid&amp;gt;
            {/* &amp;lt;Typography variant="h6" gutterBottom component="div" sx={{ p: 2, pb: 0, top: 'auto', bottom: 2 }}&amp;gt;
            &amp;lt;MuiLink color="inherit" href="/"&amp;gt;
              &amp;lt;HomeIcon sx={{ color: '#faf8f7' }} /&amp;gt; Home
            &amp;lt;/MuiLink&amp;gt;{' '} 

          &amp;lt;/Typography&amp;gt;  */}

            &amp;lt;Grid item xs sx={{ justifyContent: 'flex-end' }}&amp;gt;

              &amp;lt;item&amp;gt;
                &amp;lt;Box sx={{ flexGrow: 1, backgroundColor: '#3a3632' }} /&amp;gt;
                &amp;lt;Box position='left' sx={{ display: { xs: 'none', md: 'flex' } }}&amp;gt;
                  &amp;lt;ButtonGroup variant="contained" ref={anchorRef} aria-label="split button" &amp;gt;
                    &amp;lt;Button onClick={handleClick} sx={{ color: '#faf8f7', border: 2, backgroundColor: '#3a3632' }}&amp;gt;{options[selectedIndex]}&amp;lt;/Button&amp;gt;
                    &amp;lt;Button
                      size="small"
                      aria-controls={open ? 'split-button-menu' : undefined}
                      aria-expanded={open ? 'true' : undefined}
                      aria-label="select merge strategy"
                      aria-haspopup="menu"
                      onClick={handleToggle}
                    &amp;gt;
                      &amp;lt;ArrowDropDownIcon sx={{ color: '#faf8f7' }} /&amp;gt;
                    &amp;lt;/Button&amp;gt;
                  &amp;lt;/ButtonGroup&amp;gt;
                  &amp;lt;Popper
                    sx={{
                      zIndex: 1, width: '20%', justifyContent: 'flex-end', aligntext: 'middle', backgroundColor: '#3a3632'
                    }}
                    open={open}
                    anchorEl={anchorRef.current}
                    role={undefined}
                    transition
                    disablePortal
                  &amp;gt;
                    {({ TransitionProps, placement }) =&amp;gt; (
                      &amp;lt;Grow sx={{ zIndex: '10' }}
                        {...TransitionProps}
                        style={{
                          transformOrigin:
                            placement === 'bottom' ? 'center top' : 'center bottom',
                        }}
                      &amp;gt;
                        &amp;lt;Paper sx={{ height: '100%', backgroundColor: '#3a3632', color: '#faf8f7' }}&amp;gt;
                          &amp;lt;ClickAwayListener onClickAway={handleClose}&amp;gt;
                            &amp;lt;MenuList id="split-button-menu" autoFocusItem sx={{ color: '#faf8f7', backgroundColor: '#3a3632', textColor: '#faf8f7' }}&amp;gt;
                              {options.map((option, index) =&amp;gt; (
                                &amp;lt;MenuItem
                                  key={option}
                                  disabled={index === 2}
                                  selected={index === selectedIndex}
                                  onClick={(event) =&amp;gt; handleMenuItemClick(event, index)}
                                &amp;gt;
                                  {option}
                                &amp;lt;/MenuItem&amp;gt;
                              ))}
                            &amp;lt;/MenuList&amp;gt;
                          &amp;lt;/ClickAwayListener&amp;gt;
                        &amp;lt;/Paper&amp;gt;
                      &amp;lt;/Grow&amp;gt;
                    )}
                  &amp;lt;/Popper&amp;gt;

                &amp;lt;/Box&amp;gt;
              &amp;lt;/item&amp;gt;           &amp;lt;/Grid&amp;gt;
          &amp;lt;/Grid&amp;gt;
        &amp;lt;/Toolbar&amp;gt;
      &amp;lt;/AppBar&amp;gt;
      &amp;lt;Grid sx={{ width: '100%' , height: '100%', backgroundColor: '#3a3632', color: '#faf8f7', zIndex: 1 }}&amp;gt; &amp;lt;Slide direction="down" in={clicked} container={containerRef.current} mountOnEnter unmountOnExit&amp;gt;
        &amp;lt;Box&amp;gt; &amp;lt;BrokenComponantTabbes /&amp;gt; &amp;lt;/Box&amp;gt;

      &amp;lt;/Slide&amp;gt;
      &amp;lt;/Grid&amp;gt;



    &amp;lt;/React.Fragment&amp;gt;
  );
}


export default Navigations

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>react</category>
      <category>nextjs</category>
      <category>mui</category>
    </item>
    <item>
      <title>Just a css grid that slides in</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Sun, 18 Sep 2022 18:13:35 +0000</pubDate>
      <link>https://dev.to/cadentic/just-grid-that-slides-in-4lha</link>
      <guid>https://dev.to/cadentic/just-grid-that-slides-in-4lha</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as React from 'react';
import Box from '@mui/material/Box';
import Switch from '@mui/material/Switch';
import Paper from '@mui/material/Paper';
import Slide from '@mui/material/Slide';
import Button from '@mui/material/Button';
import { Card, Grid, Typography } from '@mui/material';
import { red } from '@mui/material/colors';

const icon = (
  &amp;lt;Box
  sx={{
    display: 'grid',
    gridAutoFlow: 'row',
    gridTemplateColumns: 'repeat(4, 1fr)',
  //  gridTemplateRows: 'repeat(2, 50px)',
    gap: 0.02,
  }}
&amp;gt;
  &amp;lt;item&amp;gt;  &amp;lt;Card sx={{ m: 1 }}&amp;gt;
    &amp;lt;Box component="container" sx={{ width: '100%', height: '100%' }}&amp;gt;
 &amp;lt;Typography sx={{color: 'ButtonShadow' ,width: '100%' }}&amp;gt;    sliding menu &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt; &amp;lt;/item&amp;gt;
  &amp;lt;item&amp;gt;  &amp;lt;Card sx={{ m: 1 }}&amp;gt;
    &amp;lt;Box component="container" sx={{ width: '100%', height: '100%' }}&amp;gt;
 &amp;lt;Typography sx={{color: 'ButtonShadow' ,width: '100%' }}&amp;gt;    sliding menu &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt; &amp;lt;/item&amp;gt;
  &amp;lt;item&amp;gt;  &amp;lt;Card sx={{ m: 1 }}&amp;gt;
    &amp;lt;Box component="container" sx={{ width: '100%', height: '100%' }}&amp;gt;
 &amp;lt;Typography sx={{color: 'ButtonShadow' ,width: '100%' }}&amp;gt;    sliding menu &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt; &amp;lt;/item&amp;gt;
  &amp;lt;item&amp;gt;  &amp;lt;Card sx={{ m: 1 }}&amp;gt;
    &amp;lt;Box component="container" sx={{ width: '100%', height: '100%' }}&amp;gt;
 &amp;lt;Typography sx={{color: 'ButtonShadow' ,width: '100%' }}&amp;gt;    sliding menu &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  &amp;lt;/Card&amp;gt; &amp;lt;/item&amp;gt;
  &amp;lt;/Box&amp;gt;
);

export default function SimpleSlide() {
  const [checked, setChecked] = React.useState(false);

  const handleChange = () =&amp;gt; {
    setChecked((prev) =&amp;gt; !prev);
  };

  return (
    &amp;lt;Box sx={{ height: 180 }}&amp;gt;
      &amp;lt;Box sx={{ width: `calc(100px + 16px)` }}&amp;gt;
        &amp;lt;Button
        onClick={handleChange}
          label="Show"
        &amp;gt; click me &amp;lt;/Button&amp;gt;
        &amp;lt;Slide direction="right" in={checked} mountOnEnter unmountOnExit&amp;gt;
          {icon}
        &amp;lt;/Slide&amp;gt;
      &amp;lt;/Box&amp;gt;
    &amp;lt;/Box&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;awesome meterial based gid :P &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>can anyone suggest about a reader narrative button like medium</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Sun, 18 Sep 2022 10:33:04 +0000</pubDate>
      <link>https://dev.to/cadentic/can-anyone-suggest-about-a-reader-button-like-medium-4jhj</link>
      <guid>https://dev.to/cadentic/can-anyone-suggest-about-a-reader-button-like-medium-4jhj</guid>
      <description>&lt;p&gt;the great medium dot com has a buttons that reads out the text of the whole website ? is there ant react component available that can read them ? i guess there must be something like that available. if it is not available through any matarial ui / react library can anyone suggest how to create such from the scratch?  &lt;/p&gt;

&lt;p&gt;this button will be most welcomed for the low visioned people so let me know the details about it. &lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>javascript</category>
      <category>mui</category>
    </item>
    <item>
      <title>theme.js while using MUI in nextjs project</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Sat, 17 Sep 2022 17:18:42 +0000</pubDate>
      <link>https://dev.to/cadentic/themejs-while-using-mui-in-nextjs-project-490a</link>
      <guid>https://dev.to/cadentic/themejs-while-using-mui-in-nextjs-project-490a</guid>
      <description>&lt;p&gt;&lt;a href="https://mui.com/material-ui/customization/theming/"&gt;Theming Mui &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this offer a theming methods but from react 18 and next i never able to use theme.js in my system. this below button's styling works for me but i need re-usability of such css.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;Button css={css` 
  display: flex;
  align-items: center;
  justify-content: center;                          
  background-color: black;
  color: white;
  font-size: 10px;
  padding: 10px 60px;
  border-radius: 5px;
  margin: 10px 0px;
  cursor: pointer;
  margin-left: 10px;
  :hover {
            color: #3e2723;
            border:2px solid #3e2723;
            border-color: #3e2723;
            transition: border-color 0s ease-out 0.6s, width 0.3s ease-out 0.6s, height 0.3s ease-out .7s;
          }
`}&amp;gt;  Click for More &amp;lt;/Button&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>help</category>
      <category>nextjs</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Home.getInitialProps()" should resolve to an object. But found "undefined" instead</title>
      <dc:creator>sayantan chakraborty</dc:creator>
      <pubDate>Sat, 17 Sep 2022 11:22:42 +0000</pubDate>
      <link>https://dev.to/cadentic/homegetinitialprops-should-resolve-to-an-object-but-found-undefined-instead-1hk8</link>
      <guid>https://dev.to/cadentic/homegetinitialprops-should-resolve-to-an-object-but-found-undefined-instead-1hk8</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Home.getInitialProps = async ctx =&amp;gt; {
  /*  try {

    const res = await axios.get('http://localhost:1337/api/' + 'pages');
    const Pages = res.data;
//    console.log(Pages);     
    return { Pages};
  //  return { HomeAccordition };
  } catch (error) {
    return { error };
  }
*/
  let Pages =
  "'http://localhost:1337/api/' + 'pages'";
let homeAaccorditions =
  "'http://localhost:1337/api/' + 'home-accorditions'";
let Menus =
  "'http://localhost:1337/api/' + 'menus'";

let HeroSections =
 "'http://localhost:1337/api/' + 'hero-sections'";
const requestPages = axios.get(Pages);
const requesthomeAaccorditions = axios.get(homeAaccorditions);
const requestMenus = axios.get(Menus);
const requestHeroSections = axios.get(HeroSections);

axios
  .all([requestPages, requesthomeAaccorditions, requestMenus, requestHeroSections])
  .then(
    axios.spread((...responses) =&amp;gt; {
      const requestPages = responses[0];
      const requesthomeAaccorditions = responses[1];
      const requestMenus = responses[2];
      const requestHeroSections = responses[3];

      // use/access the results

      console.log(requestPages, requesthomeAaccorditions, requestMenus, requestHeroSections );
    })
  )
  .catch(errors =&amp;gt; {
    // react on errors.
    console.error(errors);
  });

};

export default Home;
//Home.getInitialProps = getInitialProps;

looking for a easy solutions to this. i was intended to return these responses so that we can call them in a component
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nextjs</category>
      <category>strapi</category>
      <category>axios</category>
      <category>help</category>
    </item>
  </channel>
</rss>
