~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/pds.js

An atproto PDS in JavaScript, for Cloudflare Workers and Node

0
0
main
26 lines · 915 B Raw History
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { App } from '#/app.jsx';
import { SessionProvider } from '#/lib/session.jsx';
import './style.css';

// A space is written to while this tab is open, so a view is refetched when the
// window comes back rather than held for the session. Failures are shown rather
// than retried: an authorization refusal and an unreachable repo host both read
// as errors here, and neither improves by being asked again.
const queryClient = new QueryClient({
  defaultOptions: {
    queries: { staleTime: 30_000, retry: false },
  },
});

createRoot(document.getElementById('root')).render(
  <StrictMode>
    <QueryClientProvider client={queryClient}>
      <SessionProvider>
        <App />
      </SessionProvider>
    </QueryClientProvider>
  </StrictMode>,
);