We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9180fbd commit 8cd1058Copy full SHA for 8cd1058
src/app/components/PropertyMap.tsx
@@ -153,8 +153,23 @@ const PropertyMap: FC<PropertyMapProps> = ({
153
154
setFeatureCount(features.length);
155
156
+ const priorities: { [key: string]: number } = {
157
+ High: 1,
158
+ Medium: 2,
159
+ Low: 3,
160
+ };
161
+
162
+ const sortedFeatures = features
163
+ .sort((a, b) => {
164
+ return (
165
+ priorities[a?.properties?.priority_level || ""] -
166
+ priorities[b?.properties?.priority_level || ""]
167
+ );
168
+ })
169
+ .slice(0, 100);
170
171
// only set the first 100 properties in state
- setFeaturesInView(features.slice(0, 100));
172
+ setFeaturesInView(sortedFeatures);
173
setLoading(false);
174
};
175
0 commit comments