Files
Feeld/web
Trey T 8b3e3eb839 Make server the single source of truth for active location
Two devices on the same account each kept their own localStorage location and
re-asserted it onto Feeld's single shared account-location slot on every Discover
mount — so loading the site on device B would overwrite the location device A
had just set (San Antonio → Dallas).

- useLocation: on server sync, always adopt the server's current/custom location,
  overriding this device's local cache (was local-first via a `!location` guard).
  Devices now converge to the server value on load. Expose `locationReady`.
- Discover: wait for `locationReady` before pushing DeviceLocationUpdate, and push
  whenever the authoritative location changes (deduped by coords) instead of a
  one-shot stale-cache assert. Device B now stamps the server's value onto Feeld,
  not its own old location.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-07 10:46:43 -05:00
..
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00
2026-03-20 18:49:48 -05:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])