Skip to content

Commit

Permalink
Merge pull request #37 from reedoooo/feat/deckListCardRenderAnimation…
Browse files Browse the repository at this point in the history
…Transition

removed modal context and replaced with consistent usedialogstate hoo…
  • Loading branch information
reedoooo authored Apr 27, 2024
2 parents c494831 + 63db60b commit c85b68f
Show file tree
Hide file tree
Showing 120 changed files with 3,545 additions and 6,146 deletions.
142 changes: 142 additions & 0 deletions cleanup/MainContentSection.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// import React from 'react';
// import { useTheme } from '@mui/material/styles';
// import {
// Grid,
// Card,
// CardHeader,
// CardContent,
// CardActions,
// Stack,
// Container,
// useMediaQuery,
// } from '@mui/material';
// import { useMode } from '../../context';
// import MDBox from '../REUSABLE_COMPONENTS/MDBOX';
// import MDTypography from '../REUSABLE_COMPONENTS/MDTYPOGRAPHY/MDTypography';
// import MDAvatar from '../../layout/REUSABLE_COMPONENTS/MDAVATAR';
// import MDButton from '../REUSABLE_COMPONENTS/MDBUTTON';
// import SingleCardAnimation from '../../assets/animations/SingleCardAnimation';
// import CardChart from '../../layout/CardChart';
// import useCardCronJob from '../../layout/useCardCronJob';
// import {
// StyledContainerBox,
// StyledPaper,
// } from '../REUSABLE_STYLED_COMPONENTS/ReusableStyledComponents';
// import placeHolder from '../../assets/images/placeholder.jpeg';
// import { DEFAULT_COLLECTION } from '../../context/constants';
// import useManageCookies from '../../context/hooks/useManageCookies';
// import RCButton from '../REUSABLE_COMPONENTS/RCBUTTON';
// import useUserData from '../../context/MAIN_CONTEXT/UserContext/useUserData';
// import useManager from '../../context/MAIN_CONTEXT/CollectionContext/useManager';

// const MainContentSection = () => {
// const { theme } = useMode();
// const { getCookie } = useManageCookies();
// const { isLoggedIn } = getCookie(['isLoggedIn']);
// const { user } = useUserData();
// const {
// collections: allCollections,
// selectedCollection,
// hasFetchedCollections,
// } = useManager();
// const isMdUp = useMediaQuery(theme.breakpoints.up('md'));
// const initialCardsData = hasFetchedCollections
// ? allCollections[0]?.cards[0]
// : DEFAULT_COLLECTION.addMultipleDefaultCards(5);
// const { cardData } = useCardCronJob(initialCardsData);

// const renderStatItem = (label, value) => (
// <MDTypography variant="body1" color="primary" component="div">
// <strong>{label}:</strong> {value}
// </MDTypography>
// );

// return (
// <section className="main-content-section">
// <StyledContainerBox>
// <Grid container spacing={2}>
// <Grid item xs={12} lg={7.5}>
// <StyledPaper>
// <Grid container spacing={1} direction="row">
// {isMdUp && (
// <Grid item md={6}>
// <MDBox
// sx={{
// display: 'flex',
// justifyContent: 'center',
// alignItems: 'center',
// width: '100%',
// height: '100%',
// }}
// >
// <SingleCardAnimation cardImage={cardData?.image} />
// </MDBox>
// </Grid>
// )}
// <Grid item xs={12} md={6}>
// <Container>
// <CardChart cardData={cardData} />
// </Container>
// </Grid>
// </Grid>
// </StyledPaper>
// </Grid>
// <Grid item xs={12} lg={4.5}>
// <StyledPaper>
// {isLoggedIn && (
// <Card>
// <CardHeader
// title="User Account"
// subheader={`Welcome back, ${user?.userBasicData?.firstName}!`}
// avatar={<MDAvatar src={placeHolder} alt={'User avatar'} />}
// />
// <CardContent>
// <Stack direction={'row'} spacing={2}>
// {renderStatItem(
// 'Total Value of Collections',
// selectedCollection?.totalPrice
// )}
// {renderStatItem(
// 'Number of Decks',
// user?.allDecks?.length
// )}
// {renderStatItem(
// 'Number of Collections',
// allCollections?.length
// )}
// {renderStatItem(
// 'Total Cards Purchased',
// user?.allCollections?.reduce(
// (acc, collection) => acc + collection.cards.length,
// 0
// )
// )}
// </Stack>
// </CardContent>
// <CardActions>
// <RCButton
// color="success"
// size="large"
// variant="holo"
// withContainer={false}
// onClick={() => {
// console.log('clicked');
// }}
// >
// Manage Collections
// </RCButton>
// <MDButton variant="outlined" color="primary" size="medium">
// View Purchase History
// </MDButton>
// </CardActions>
// </Card>
// )}
// </StyledPaper>
// </Grid>
// </Grid>
// </StyledContainerBox>
// </section>
// );
// };

// export default MainContentSection;
36 changes: 15 additions & 21 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import './assets/css/card.css';
import './assets/css/page.css';
import Main from './Main';
import {
ModalProvider,
UserProvider,
useMode,
CollectionProvider,
// CollectionProvider,
CardProvider,
DeckProvider,
CartProvider,
SidebarProvider,
AppContextProvider,
// DeckProvider,
// CartProvider,
// AppContextProvider,
ConfiguratorProvider,
} from './context';
import { ThemeProvider } from 'styled-components';
Expand All @@ -31,21 +29,17 @@ const App = () => {
<ParallaxProvider>
<ConfiguratorProvider>
<UserProvider>
<ModalProvider>
<CollectionProvider>
<CardProvider>
<DeckProvider>
<CartProvider>
<SidebarProvider>
<AppContextProvider>
<Main />
</AppContextProvider>
</SidebarProvider>
</CartProvider>
</DeckProvider>
</CardProvider>
</CollectionProvider>
</ModalProvider>
{/* <CollectionProvider> */}
<CardProvider>
{/* <DeckProvider> */}
{/* <CartProvider> */}
{/* <AppContextProvider> */}
<Main />
{/* </AppContextProvider> */}
{/* </CartProvider> */}
{/* </DeckProvider> */}
</CardProvider>
{/* </CollectionProvider> */}
</UserProvider>
</ConfiguratorProvider>
</ParallaxProvider>
Expand Down
157 changes: 157 additions & 0 deletions src/assets/scss/_themes-vars.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
// paper & background
$paper: #ffffff;

// primary
$primaryLight: #eef2f6;
$primaryMain: #2196f3;
$primaryDark: #1e88e5;
$primary200: #90caf9;
$primary800: #1565c0;

// secondary
$secondaryLight: #ede7f6;
$secondaryMain: #673ab7;
$secondaryDark: #5e35b1;
$secondary200: #b39ddb;
$secondary800: #4527a0;

// success Colors
$successLight: #b9f6ca;
$success200: #69f0ae;
$successMain: #00e676;
$successDark: #00c853;

// error
$errorLight: #ef9a9a;
$errorMain: #f44336;
$errorDark: #c62828;

// orange
$orangeLight: #fbe9e7;
$orangeMain: #ffab91;
$orangeDark: #d84315;

// warning
$warningLight: #fff8e1;
$warningMain: #ffe57f;
$warningDark: #ffc107;

// grey
$grey50: #f8fafc;
$grey100: #eef2f6;
$grey200: #e3e8ef;
$grey300: #cdd5df;
$grey500: #697586;
$grey600: #4b5565;
$grey700: #364152;
$grey900: #121926;

// ==============================|| DARK THEME VARIANTS ||============================== //

// paper & background
$darkBackground: #1a223f; // level 3
$darkPaper: #111936; // level 4

// dark 800 & 900
$darkLevel1: #29314f; // level 1
$darkLevel2: #212946; // level 2

// primary dark
$darkPrimaryLight: #eef2f6;
$darkPrimaryMain: #2196f3;
$darkPrimaryDark: #1e88e5;
$darkPrimary200: #90caf9;
$darkPrimary800: #1565c0;

// secondary dark
$darkSecondaryLight: #d1c4e9;
$darkSecondaryMain: #7c4dff;
$darkSecondaryDark: #651fff;
$darkSecondary200: #b39ddb;
$darkSecondary800: #6200ea;

// text variants
$darkTextTitle: #d7dcec;
$darkTextPrimary: #bdc8f0;
$darkTextSecondary: #8492c4;

// ==============================|| JAVASCRIPT ||============================== //

:export {
// paper & background
paper: $paper;

// primary
primaryLight: $primaryLight;
primary200: $primary200;
primaryMain: $primaryMain;
primaryDark: $primaryDark;
primary800: $primary800;

// secondary
secondaryLight: $secondaryLight;
secondary200: $secondary200;
secondaryMain: $secondaryMain;
secondaryDark: $secondaryDark;
secondary800: $secondary800;

// success
successLight: $successLight;
success200: $success200;
successMain: $successMain;
successDark: $successDark;

// error
errorLight: $errorLight;
errorMain: $errorMain;
errorDark: $errorDark;

// orange
orangeLight: $orangeLight;
orangeMain: $orangeMain;
orangeDark: $orangeDark;

// warning
warningLight: $warningLight;
warningMain: $warningMain;
warningDark: $warningDark;

// grey
grey50: $grey50;
grey100: $grey100;
grey200: $grey200;
grey300: $grey300;
grey500: $grey500;
grey600: $grey600;
grey700: $grey700;
grey900: $grey900;

// ==============================|| DARK THEME VARIANTS ||============================== //

// paper & background
darkPaper: $darkPaper;
darkBackground: $darkBackground;

// dark 800 & 900
darkLevel1: $darkLevel1;
darkLevel2: $darkLevel2;

// text variants
darkTextTitle: $darkTextTitle;
darkTextPrimary: $darkTextPrimary;
darkTextSecondary: $darkTextSecondary;

// primary dark
darkPrimaryLight: $darkPrimaryLight;
darkPrimaryMain: $darkPrimaryMain;
darkPrimaryDark: $darkPrimaryDark;
darkPrimary200: $darkPrimary200;
darkPrimary800: $darkPrimary800;

// secondary dark
darkSecondaryLight: $darkSecondaryLight;
darkSecondaryMain: $darkSecondaryMain;
darkSecondaryDark: $darkSecondaryDark;
darkSecondary200: $darkSecondary200;
darkSecondary800: $darkSecondary800;
}
26 changes: 4 additions & 22 deletions src/assets/themes/base/colors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
redAccent,
blueAccent,
customDarkTheme,
white,
black,
myGradients,
} from './customColorPalettes';
const colors = {
Expand Down Expand Up @@ -48,31 +50,11 @@ const colors = {
// ERROR COLORS
error,
grey,
// OTHER COLORS
// text: {
// main: '#7b809a',
// focus: '#7b809a',
// },

white,
black,
transparent: {
main: 'transparent',
},

white: {
main: '#ffffff',
focus: '#ffffff',
},

black: {
light: '#000000',
main: '#000000',
focus: '#000000',
},

green: {
main: '#5CDB95',
focus: '#379683',
},
primary,
secondary,
light: {
Expand Down
Loading

0 comments on commit c85b68f

Please sign in to comment.