Files
eranos/src/App.tsx
T
shakespeare.diy 4f1b4800d0 Build Mew: a full-featured kind 1 Nostr client
- Dark theme with purple accent colors matching the reference design
- Three-column layout: left sidebar, main feed, right sidebar
- Left sidebar: Mew logo, search, navigation (Home, Notifications, Search, Vines, Profile, Wallet, Settings, More), compose button, user profile/login
- Main feed: compose box, Follows/Global tabs, live note cards with avatars, author info, NIP-05 verification, relative timestamps, image attachments, and action buttons (reply, repost, like, zap, more)
- Right sidebar: trending hashtags with sparklines, latest accounts, footer
- Full routing: home, profile, notifications, search, hashtags, settings (profile/relays), placeholder pages
- NIP-19 routing with automatic profile redirect
- Custom hooks: useFeed, useTrendingTags, useLatestAccounts, useEventStats
- NoteContent renders mentions, links, and hashtags as clickable elements
- Inter Variable font, skeleton loading states, responsive layout

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-16 17:05:32 -06:00

71 lines
2.1 KiB
TypeScript

// NOTE: This file should normally not be modified unless you are adding a new provider.
// To add new routes, edit the AppRouter.tsx file.
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { createHead, UnheadProvider } from '@unhead/react/client';
import { InferSeoMetaPlugin } from '@unhead/addons';
import { Suspense } from 'react';
import NostrProvider from '@/components/NostrProvider';
import { NostrSync } from '@/components/NostrSync';
import { Toaster } from "@/components/ui/toaster";
import { TooltipProvider } from "@/components/ui/tooltip";
import { NostrLoginProvider } from '@nostrify/react/login';
import { AppProvider } from '@/components/AppProvider';
import { NWCProvider } from '@/contexts/NWCContext';
import { AppConfig } from '@/contexts/AppContext';
import AppRouter from './AppRouter';
const head = createHead({
plugins: [
InferSeoMetaPlugin(),
],
});
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: 60000, // 1 minute
gcTime: Infinity,
},
},
});
const defaultConfig: AppConfig = {
theme: "dark",
relayMetadata: {
relays: [
{ url: 'wss://relay.ditto.pub', read: true, write: true },
{ url: 'wss://relay.primal.net', read: true, write: true },
{ url: 'wss://relay.damus.io', read: true, write: true },
],
updatedAt: 0,
},
};
export function App() {
return (
<UnheadProvider head={head}>
<AppProvider storageKey="nostr:app-config" defaultConfig={defaultConfig}>
<QueryClientProvider client={queryClient}>
<NostrLoginProvider storageKey='nostr:login'>
<NostrProvider>
<NostrSync />
<NWCProvider>
<TooltipProvider>
<Toaster />
<Suspense>
<AppRouter />
</Suspense>
</TooltipProvider>
</NWCProvider>
</NostrProvider>
</NostrLoginProvider>
</QueryClientProvider>
</AppProvider>
</UnheadProvider>
);
}
export default App;