Skip to content

Commit

Permalink
pushing current edits for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
reedoooo committed Mar 11, 2024
1 parent 60998e3 commit daf92b3
Show file tree
Hide file tree
Showing 185 changed files with 13,757 additions and 6,691 deletions.
15 changes: 15 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"development"
],
"hints": {
"compat-api/css": [
"default",
{
"ignore": [
"backdrop-filter"
]
}
]
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@mui/x-data-grid": "^6.16.2",
"@mui/x-date-pickers": "^6.10.1",
"@nivo/line": "^0.83.0",
"@nivo/pie": "^0.84.0",
"@stripe/react-stripe-js": "^2.1.1",
"@stripe/stripe-js": "^1.54.2",
"auth0-js": "^9.22.1",
Expand All @@ -31,6 +32,7 @@
"material-ui-image": "^3.3.2",
"moment": "^2.29.4",
"notistack": "^3.0.1",
"polished": "^4.3.1",
"react": "^17.0.0 || ^18.0.0",
"react-cookie": "^4.1.1",
"react-device-detect": "^2.2.3",
Expand Down
65 changes: 30 additions & 35 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ import {
FormProvider,
ModalProvider,
PopoverProvider,
SocketProvider,
UserProvider,
useMode,
CollectionProvider,
CombinedProvider,
CardProvider,
CronJobProvider,
DeckProvider,
CartProvider,
CardImagesProvider,
Expand All @@ -24,13 +21,14 @@ import {
usePageContext,
ErrorBoundary,
ConfiguratorProvider,
VisibilityProvider,
} from './context';
import { ThemeProvider } from 'styled-components';
import { SnackbarProvider, useSnackbar } from 'notistack';

import { useNavigate } from 'react-router-dom';
import { CssBaseline, GlobalStyles } from '@mui/material';
import { ParallaxProvider } from 'react-scroll-parallax';
import { useLoading } from './context/hooks/useLoading';

// ==============================|| APP ||============================== //

Expand All @@ -39,12 +37,13 @@ const App = () => {
const navigate = useNavigate();
const { resetLogoutTimer, logout, authUser, userId, isLoggedIn } =
useAuthContext();
const { loadingStatus, returnDisplay, setLoading, setError } =
usePageContext();
useEffect(() => {
if (!isLoggedIn && !loadingStatus.isPageLoading) navigate('/login');
}, [isLoggedIn, navigate, loadingStatus.isPageLoading]);
if (loadingStatus?.isPageLoading || loadingStatus?.error) {
const { returnDisplay } = usePageContext();
const { isLoading, isPageLoading, error } = useLoading();

// useEffect(() => {
// if (!isLoggedIn && !isPageLoading) navigate('/login');
// }, [isLoggedIn, navigate, isPageLoading]);
if (isPageLoading || error) {
return returnDisplay();
}
return (
Expand All @@ -54,41 +53,37 @@ const App = () => {
<GlobalStyles />
<ParallaxProvider>
<ConfiguratorProvider>
<FormProvider>
<SocketProvider>
<VisibilityProvider>
<FormProvider>
<UserProvider>
<ModalProvider>
<SnackbarProvider>
<PopoverProvider>
<CollectionProvider>
<CombinedProvider>
<CardProvider>
<CronJobProvider>
<DeckProvider>
<CartProvider>
<CardImagesProvider>
<ChartProvider>
<StatisticsProvider>
<SidebarProvider>
<AppContextProvider>
<Main />
</AppContextProvider>
</SidebarProvider>
</StatisticsProvider>
</ChartProvider>
</CardImagesProvider>
</CartProvider>
</DeckProvider>
</CronJobProvider>
</CardProvider>
</CombinedProvider>
<CardProvider>
<DeckProvider>
<CartProvider>
<CardImagesProvider>
<ChartProvider>
<StatisticsProvider>
<SidebarProvider>
<AppContextProvider>
<Main />
</AppContextProvider>
</SidebarProvider>
</StatisticsProvider>
</ChartProvider>
</CardImagesProvider>
</CartProvider>
</DeckProvider>
</CardProvider>
</CollectionProvider>
</PopoverProvider>
</SnackbarProvider>
</ModalProvider>
</UserProvider>
</SocketProvider>
</FormProvider>
</FormProvider>
</VisibilityProvider>
</ConfiguratorProvider>
</ParallaxProvider>
</ThemeProvider>
Expand Down
5 changes: 3 additions & 2 deletions src/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Navigation from './layout/navigation/Navigation.jsx';
import LoadingIndicator from './components/reusable/indicators/LoadingIndicator.js';
import Configurator from './layout/REUSABLE_COMPONENTS/Configurator/index.jsx';
import { useCardStoreHook } from './context/hooks/useCardStore.jsx';
import { AppContainer } from './pages/pageStyles/StyledComponents.jsx';

// Define all routes in a single array including the component name for laziness
const ROUTE_CONFIG = [
Expand Down Expand Up @@ -39,7 +40,7 @@ const Main = () => {
const { isLoggedIn } = useAuthContext();
const { isConfiguratorOpen, toggleConfigurator } = useConfiguratorContext();
return (
<React.Fragment>
<>
{!isLoggedIn ? (
<LoginDialog open={!isLoggedIn} />
) : (
Expand Down Expand Up @@ -71,7 +72,7 @@ const Main = () => {
</Suspense>
</PageLayout>
)}
</React.Fragment>
</>
);
};

Expand Down
59 changes: 59 additions & 0 deletions src/assets/animations/ZenEnso.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React, { useRef, useEffect } from 'react';
import * as THREE from 'three';

const ZenEnso = () => {
const mountRef = useRef(null);

useEffect(() => {
const width = mountRef.current.clientWidth;
const height = mountRef.current.clientHeight;
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xffffff);
const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000);
camera.position.z = 5;

const renderer = new THREE.WebGLRenderer();
renderer.setSize(width, height);
mountRef.current.appendChild(renderer.domElement);

const points = [];
const detail = 100;
const radius = 2;
const incompleteFactor = 0.85; // Making the circle incomplete
const variance = 0.2; // Increased randomness

for (let i = 0; i <= detail * incompleteFactor; i++) {
const ratio = i / detail;
const angle = 2 * Math.PI * ratio;
const randomVariance = 1 + Math.random() * variance - variance / 2;
const x = radius * Math.cos(angle) * randomVariance;
const y = radius * Math.sin(angle) * randomVariance;
points.push(new THREE.Vector3(x, y, 0));
}

const geometry = new THREE.BufferGeometry().setFromPoints(points);
const material = new THREE.LineBasicMaterial({
color: 0x000000,
linewidth: 2,
}); // Slight width
const enso = new THREE.Line(geometry, material);

scene.add(enso);

const animate = () => {
requestAnimationFrame(animate);
enso.rotation.z += 0.01; // Rotation
renderer.render(scene, camera);
};

animate();

return () => {
mountRef.current.removeChild(renderer.domElement);
};
}, []);

return <div ref={mountRef} style={{ width: '100%', height: '100%' }} />;
};

export default ZenEnso;
Loading

0 comments on commit daf92b3

Please sign in to comment.