Skip to content

Commit

Permalink
Merge pull request #53 from ResilientApp/SCM-18
Browse files Browse the repository at this point in the history
Team UI Fixes and Particle loading fixed
  • Loading branch information
aunshx authored Sep 5, 2024
2 parents 7a6371c + f82d916 commit f723fc2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
39 changes: 16 additions & 23 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const BorderToggleRef = () => {
}

const PreSynthApp = () => {
const [isLoading, setIsLoading] = useState(false);
const [isParticleLoading, setIsParticleLoading] = useState(false);
const [init, setInit] = useState(false);
const { toggleLightTheme, toggleDarkTheme } = useContext(ThemeContext);

Expand All @@ -40,49 +40,42 @@ const PreSynthApp = () => {
useEffect(() => {
const initEngine = async () => {
try {
setIsLoading(true);
setIsParticleLoading(true);
await initParticlesEngine(async (engine) => {
await loadSlim(engine);
});
setInit(true);
} catch (error) {
console.error("Initialization failed:", error);
} finally {
setIsLoading(false);
setIsParticleLoading(false);
}
};
initEngine();
}, []);

const particlesLoaded = (container) => {
};
const particlesLoaded = (container) => {};



return (
<>
{isMobile ? (
{false ? (
<OnlyDesktop />
) : (
<>
{false ? (
<Loader />
) : (
<Router>
<Routes>
<Route index element={<Navigate to={`${URL_REROUTE_PAGE}`} />} />
<Router>
<Routes>
<Route index element={<Navigate to={`${URL_REROUTE_PAGE}`} />} />

<Route path={`${URL_TEAM_PAGE}`} element={<Team />} />
<Route path={`${URL_HOME_PAGE}`} element={<Home />} />
<Route path={`${URL_VISUALIZER_PAGE}`} element={<Visualizer />} />

<Route path='*' element={<NotFound />} />
</Routes>
</Router>
)}
<ParticleWrapper init={init} particlesLoaded={particlesLoaded} />
</>
<Route path={`${URL_TEAM_PAGE}`} element={<Team loading={isParticleLoading} />} />
<Route path={`${URL_HOME_PAGE}`} element={<Home />} />
<Route path={`${URL_VISUALIZER_PAGE}`} element={<Visualizer />} />

<Route path='*' element={<NotFound />} />
</Routes>
</Router>
)}
<ParticleWrapper init={init} particlesLoaded={particlesLoaded} />
</>
);
}
Expand Down
20 changes: 13 additions & 7 deletions src/Components/Pages/Team/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, { useContext } from 'react';
import { BorderToggleRef } from '../../../App';
import { NavbarToggleContext } from '../../../Context/navbarToggle';
import { teamIcon } from '../../../Resources/Icons';
import Footer from '../../Shared/Footer';
import Loader from '../../Shared/Loader';
import Navbar from '../../Shared/Navbar';
import Title, { Subtitle } from '../../Shared/Title';
import Wrapper from '../../Shared/Wrapper';
import { CurrentTeamCard, PastMembersCard } from './Ancilliary/Components/Card';
import { currentTeam, pastMembers } from './Ancilliary/Data/data';
import { NavbarToggleContext } from '../../../Context/navbarToggle';
import Navbar from '../../Shared/Navbar';
import { BorderToggleRef } from '../../../App';
import Footer from '../../Shared/Footer';

const Team = () => {
return (
Expand Down Expand Up @@ -42,13 +43,18 @@ const Team = () => {
);
}

const Index = () => {
const Index = ({ loading }) => {
const { borderToggle } = useContext(NavbarToggleContext);

return (
<>
<Navbar borderToggle={borderToggle} />
<Navbar borderToggle = { borderToggle } />
<BorderToggleRef />
<Team />
{loading ? (
<Loader />
) : (
<Team />
)}
<Footer />
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Overview = ({ goToElement }) => {
/>
<FontVarTitle title={'Overview'} />
</div>
<div className="overflow-y-scroll h-full">
<div className="overflow-y-scroll h-full scrollbar">
<SmallTable />
</div>
<div className='w-full flex items-center justify-center gap-x-2 border-t-3p border-solid border-gray-700 dark:border-gray-50 cursor-pointer hover:dark:bg-green-80 h-60p' onClick={() => goToElement("transaction-table")}>
Expand Down

0 comments on commit f723fc2

Please sign in to comment.