Closed michael-duren closed 11 months ago
Name | Link |
---|---|
Latest commit | 49f1ff4437a332a23011983b05ac89e5b8e528ed |
Latest deploy log | https://app.netlify.com/sites/tsml-ui/deploys/653ec5cf0e36330008734f2a |
I am going to redo this.
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'];
};
I like this idea @joshreisner. I'm going to give another work through this weekend
React router first pass.
TsmlUi.tsx
removed state and moved it toStateContext
, this is not necessary and can be changed back.react-router-dom
, updated Link to use react routers Link component and created useEffect inTsmlUI.tsx
to listen for changes to location, and update state accordinglyControls.tsx
component. The UI updates to show the filtered output, but URL does not include query string.