Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@trnktms
Last active June 20, 2022 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trnktms/7947795a3ae15c52fd45406816ae4ef2 to your computer and use it in GitHub Desktop.
Save trnktms/7947795a3ae15c52fd45406816ae4ef2 to your computer and use it in GitHub Desktop.
import { AppContext } from '@/pages/[[...path]]';
import { Box } from '@mui/material';
import { useContext } from 'react';
export const Products = (): JSX.Element => {
const { products: contextProducts } = useContext(AppContext);
return (<Box>{contextProducts?.map(p => p.Name).concat()}</Box>);
};
export default Products;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment