code4recovery / tsml-ui

Embeddable recovery meeting finder
https://tsml-ui.code4recovery.org/
MIT License
23 stars 17 forks source link

312 react router #337

Closed michael-duren closed 11 months ago

michael-duren commented 12 months ago

React router first pass.

netlify[bot] commented 12 months ago

Deploy Preview for tsml-ui failed.

Name Link
Latest commit 49f1ff4437a332a23011983b05ac89e5b8e528ed
Latest deploy log https://app.netlify.com/sites/tsml-ui/deploys/653ec5cf0e36330008734f2a
michael-duren commented 12 months ago

I am going to redo this.

joshreisner commented 12 months ago

hey this looks good @michael-duren ! i did notice the same issues you did about the tests about the helper functions and the URL not updating.

so we have this input key in state, what if we got rid of that and instead started using useSearchParams as the source of truth for that?

  input: {
    distance: string[];
    latitude?: number;
    longitude?: number;
    meeting?: string;
    mode: 'search' | 'location' | 'me';
    region: string[];
    search?: string;
    time: TSMLReactConfig['times'];
    type: string[];
    view: 'table' | 'map';
    weekday: TSMLReactConfig['weekdays'];
  };
michael-duren commented 12 months ago

I like this idea @joshreisner. I'm going to give another work through this weekend