Skip to content

Commit

Permalink
feat: apply Tailwind-based UI library (#129)
Browse files Browse the repository at this point in the history
* feat: apply Tailwind-based UI library

* fix: use v13 of UI package

* fix: format
  • Loading branch information
VanishMax authored Nov 11, 2024
1 parent b245695 commit 0012a6a
Show file tree
Hide file tree
Showing 11 changed files with 2,275 additions and 5,586 deletions.
37 changes: 0 additions & 37 deletions app/StyleRegistry.tsx

This file was deleted.

22 changes: 8 additions & 14 deletions app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,24 @@
import { ReactNode } from 'react';
import { enableStaticRendering } from 'mobx-react-lite';
import { QueryClientProvider } from '@tanstack/react-query';
import { PenumbraUIProvider } from '@penumbra-zone/ui/PenumbraUIProvider';
import { ToastProvider } from '@penumbra-zone/ui/Toast';
import { Display } from '@penumbra-zone/ui/Display';
import { Header, SyncBar } from '@/widgets/header';
import { queryClient } from '@/shared/const/queryClient';
import { StyledComponentsRegistry } from './StyleRegistry';

// Used so that observer() won't subscribe to any observables used in an SSR environment
// and no garbage collection problems are introduced.
enableStaticRendering(typeof window === 'undefined');

export const App = ({ children }: { children: ReactNode }) => {
return (
<StyledComponentsRegistry>
<PenumbraUIProvider>
<QueryClientProvider client={queryClient}>
<Display>
<SyncBar />
<Header />
{children}
</Display>
<ToastProvider />
</QueryClientProvider>
</PenumbraUIProvider>
</StyledComponentsRegistry>
<QueryClientProvider client={queryClient}>
<Display>
<SyncBar />
<Header />
{children}
</Display>
<ToastProvider />
</QueryClientProvider>
);
};
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from '@vercel/speed-insights/next';

import './v2.css';
import '@penumbra-zone/ui/style.css';

import { App } from './app';

const RootLayout = ({ children }: { children: ReactNode }) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@penumbra-zone/protobuf": "^6.3.0",
"@penumbra-zone/transport-dom": "^7.5.0",
"@penumbra-zone/types": "^26.0.0",
"@penumbra-zone/ui": "^12.1.1",
"@penumbra-zone/ui": "^13.0.0",
"@penumbra-zone/wasm": "^31.0.0",
"@radix-ui/react-icons": "^1.3.0",
"@rehooks/component-size": "^1.0.3",
Expand Down
Loading

0 comments on commit 0012a6a

Please sign in to comment.