Skip to content

Commit

Permalink
wip: wallet view init
Browse files Browse the repository at this point in the history
  • Loading branch information
shanimal08 committed Feb 27, 2025
1 parent 883bae8 commit 2f72699
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
13 changes: 2 additions & 11 deletions src/containers/main/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import MiningView from './MiningView/MiningView';
import { DashboardContentContainer } from './styles';
import { useUIStore } from '@app/store/useUIStore.ts';
import WalletView from '@app/containers/main/Dashboard/WalletView/WalletView.tsx';

export default function Dashboard() {
const view = useUIStore((s) => s.view);
return (
<DashboardContentContainer>
{view === 'mining' ? (
<MiningView />
) : (
<div>
<h1>{`hello i am a wallet view`}</h1>
</div>
)}
</DashboardContentContainer>
);
return <DashboardContentContainer>{view === 'mining' ? <MiningView /> : <WalletView />}</DashboardContentContainer>;
}
9 changes: 9 additions & 0 deletions src/containers/main/Dashboard/WalletView/WalletView.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import styled from 'styled-components';

export const WalletViewContainer = styled.div`
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 100%;
`;
12 changes: 12 additions & 0 deletions src/containers/main/Dashboard/WalletView/WalletView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { memo } from 'react';
import { WalletViewContainer } from '@app/containers/main/Dashboard/WalletView/WalletView.styles.ts';

const WalletView = memo(function WalletView() {
return (
<WalletViewContainer>
<h1>{`👻`}</h1>
</WalletViewContainer>
);
});

export default WalletView;
10 changes: 1 addition & 9 deletions src/containers/main/MainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@ import { useAppConfigStore } from '@app/store/useAppConfigStore';
import { Dashboard } from '@app/containers/main/Dashboard';
import SidebarNavigation from '@app/containers/main/SidebarNavigation/SidebarNavigation.tsx';
import { DashboardContainer } from '@app/theme/styles.ts';
import { useUIStore } from '@app/store/useUIStore.ts';

export default function MainView() {
const visualMode = useAppConfigStore((s) => s.visual_mode);
const view = useUIStore((s) => s.view);

return (
<DashboardContainer $visualModeOff={!visualMode}>
<SidebarNavigation />
{view === 'mining' ? (
<Dashboard />
) : (
<div>
<h1>{`hello i am a wallet view`}</h1>
</div>
)}
<Dashboard />
</DashboardContainer>
);
}
1 change: 0 additions & 1 deletion src/theme/palettes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { ThemePalette } from '@app/theme/types.ts';
import { colors as c } from './colors.ts';
import { colorsAlpha, colorsAlpha as alpha } from './colorsAlpha.ts';
import { darkGradients } from '@app/theme/gradients.ts';
import { convertHexToRGBA } from '@app/utils';

const darkPalette: ThemePalette = {
mode: 'dark',
Expand Down

0 comments on commit 2f72699

Please sign in to comment.