Versions

  • v43

    8/17/2024
    Open: Version
    Changes from v42 to v43
    +1
    -1
    ⦚ 148 unchanged lines ⦚
    <tr className="m-1 hover:bg-gray-200 even:bg-gray-100 p-0">
    {headers.map(h => (
    <td className="reslative max-w-32">
    <div className="p-1 max-w-32 truncate hover:max-w-lg hover:absolute hover:left-0 hover:bottom-0 hover:bg-gray-200 hover:even:bg-gray-100 hover:z-10 hover:pr-2">
    {renderCell(h, d)}
    ⦚ 11 unchanged lines ⦚
    ⦚ 148 unchanged lines ⦚
    <tr className="m-1 hover:bg-gray-200 even:bg-gray-100 p-0">
    {headers.map(h => (
    <td className="relative max-w-32">
    <div className="p-1 max-w-32 truncate hover:max-w-lg hover:absolute hover:left-0 hover:bottom-0 hover:bg-gray-200 hover:even:bg-gray-100 hover:z-10 hover:pr-2">
    {renderCell(h, d)}
    ⦚ 11 unchanged lines ⦚
  • v42

    6/9/2024
    Open: Version
    Changes from v41 to v42
    +4
    -3
    ⦚ 97 unchanged lines ⦚
    });

    const searchLocation = await nominatimSearch({ q: search["location"] });
    const searchLatLon = { lat: parseFloat(searchLocation[0].lat), lon: parseFloat(searchLocation[0].lon) };

    const profiles = rows.map(row =>
    ⦚ 8 unchanged lines ⦚
    }),
    ))
    ).filter(profile => withinRadius(profile.Location, searchLatLon, parseInt(search.radius)));
    return Response.json({ profiles });
    }
    ⦚ 47 unchanged lines ⦚
    ⦚ 97 unchanged lines ⦚
    });

    const searchLocation = search["location"]?.length ? await nominatimSearch({ q: search["location"] }) : undefined;
    const searchLatLon = searchLocation
    && { lat: parseFloat(searchLocation[0].lat), lon: parseFloat(searchLocation[0].lon) };

    const profiles = rows.map(row =>
    ⦚ 8 unchanged lines ⦚
    }),
    ))
    ).filter(profile => searchLocation ? withinRadius(profile.Location, searchLatLon, parseInt(search.radius)) : true);
    return Response.json({ profiles });
    }
    ⦚ 47 unchanged lines ⦚
  • v41

    6/9/2024
    Open: Version
    Changes from v40 to v41
    +3
    -10
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return location && { lat: 40.6526006, lon: -73.9497211 }.lat === location.lat
    && { lat: 40.6526006, lon: -73.9497211 }.lon === location.lon;
    });
    }
    ⦚ 36 unchanged lines ⦚
    }),
    ))
    );
    console.log(profiles.length);
    const profiles2 = profiles
    .filter(profile => withinRadius(profile.Location, searchLatLon, parseInt(search.radius)));

    console.log(profiles2.length);

    return Response.json({ profiles: profiles2 });
    }

    ⦚ 46 unchanged lines ⦚
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return location && isPointWithinRadius(location, searchLocation, radius * metersInMile);
    });
    }
    ⦚ 36 unchanged lines ⦚
    }),
    ))
    ).filter(profile => withinRadius(profile.Location, searchLatLon, parseInt(search.radius)));
    return Response.json({ profiles });
    }

    ⦚ 46 unchanged lines ⦚
  • v40

    6/9/2024
    Open: Version
    Changes from v39 to v40
    +1
    -1
    ⦚ 119 unchanged lines ⦚
    console.log(profiles2.length);

    return Response.json({ profiles });
    }

    ⦚ 46 unchanged lines ⦚
    ⦚ 119 unchanged lines ⦚
    console.log(profiles2.length);

    return Response.json({ profiles: profiles2 });
    }

    ⦚ 46 unchanged lines ⦚
  • v39

    6/9/2024
    Open: Version
    Changes from v38 to v39
    +1
    -1
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return { lat: 40.6526006, lon: -73.9497211 }.lat === location.lat
    && { lat: 40.6526006, lon: -73.9497211 }.lon === location.lon;
    });
    ⦚ 95 unchanged lines ⦚
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return location && { lat: 40.6526006, lon: -73.9497211 }.lat === location.lat
    && { lat: 40.6526006, lon: -73.9497211 }.lon === location.lon;
    });
    ⦚ 95 unchanged lines ⦚
  • v38

    6/9/2024
    Open: Version
    Changes from v37 to v38
    +4
    -3
    ⦚ 69 unchanged lines ⦚
    if (!Array.isArray(profileLocation)) profileLocation = [profileLocation];
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.filter(location => {
    return location && !isPointWithinRadius(location, searchLocation, 10);
    }).length;
    }

    ⦚ 93 unchanged lines ⦚
    ⦚ 69 unchanged lines ⦚
    if (!Array.isArray(profileLocation)) profileLocation = [profileLocation];
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return { lat: 40.6526006, lon: -73.9497211 }.lat === location.lat
    && { lat: 40.6526006, lon: -73.9497211 }.lon === location.lon;
    });
    }

    ⦚ 93 unchanged lines ⦚
  • v37

    6/9/2024
    Open: Version
    Changes from v36 to v37
    +2
    -2
    ⦚ 69 unchanged lines ⦚
    if (!Array.isArray(profileLocation)) profileLocation = [profileLocation];
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return location && !isPointWithinRadius(location, searchLocation, 10);
    });
    }

    ⦚ 93 unchanged lines ⦚
    ⦚ 69 unchanged lines ⦚
    if (!Array.isArray(profileLocation)) profileLocation = [profileLocation];
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.filter(location => {
    return location && !isPointWithinRadius(location, searchLocation, 10);
    }).length;
    }

    ⦚ 93 unchanged lines ⦚
  • v36

    6/9/2024
    Open: Version
    Changes from v35 to v36
    +1
    -2
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    console.log(location, searchLocation, radius);
    return location && isPointWithinRadius(location, searchLocation, 10);
    });
    }
    ⦚ 94 unchanged lines ⦚
    ⦚ 70 unchanged lines ⦚
    const profileLocations = profileLocation.map(l => date_me_doc_locations_geo[l]);
    return profileLocations.some(location => {
    return location && !isPointWithinRadius(location, searchLocation, 10);
    });
    }
    ⦚ 94 unchanged lines ⦚
  • v35

    6/9/2024
    Open: Version
    +170
    -0

    /** @jsxImportSource https://esm.sh/react@18.2.0 */
    import isPointWithinRadius from "https://esm.sh/geolib/es/isPointWithinRadius";
    import { useLoaderData } from "https://esm.sh/react-router-dom@6.23.0?deps=react@18.2.0,react-dom@18.2.0";
    import date_me_doc_locations_geo from "https://esm.town/v/stevekrouse/date_me_doc_locations_geo";
    import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";

    function absoluteURL(url) {
    if (url.startsWith("http://") || url.startsWith("https://"))
    return url;
    else return "https://" + url;
    }

    let headers = [
    "Name",
    "Age",
    "Gender",
    "InterestedIn",
    "Style",
    "Location",
    "LocationFlexibility",
    "Contact",
    "LastUpdated",
    ];

    let linkClass = "text-sky-600 hover:text-sky-500";

    function httpsIfy(url: string) {
    if (!url.startsWith("http://") && !url.startsWith("https://")) {
    return `https://${url}`;
    }
    return url;
    }

    // TODO - refactor this into a Cell React component
    function renderCell(header, row) {
    let data = row[header];
Updated: August 17, 2024