Skip to content

Commit

Permalink
grid working
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavaviram committed Sep 17, 2024
1 parent 1109672 commit 6729827
Show file tree
Hide file tree
Showing 7 changed files with 379 additions and 416 deletions.
757 changes: 361 additions & 396 deletions frontend/package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"@fortawesome/free-brands-svg-icons": "^5.9.0",
"@fortawesome/free-solid-svg-icons": "^5.9.0",
"@fortawesome/react-fontawesome": "^0.1.4",
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"accepts": "^1.3.5",
"ag-grid-community": "^32.0.0",
"ag-grid-react": "^32.0.0",
"ag-grid-community": "^27.0.0",
"ag-grid-react": "^27.0.0",
"cookie-cutter": "^0.2.0",
"downshift": "^9.0.6",
"isomorphic-fetch": "^3.0.0",
Expand All @@ -38,8 +38,8 @@
"leaflet.markercluster": "^1.5.3",
"mailgo": "^0.12.2",
"mailto-link": "^2.0.0",
"next": "^14.1.1",
"next-seo": "^6.4.0",
"next": "^14.2.11",
"next-seo": "^6.6.0",
"node-gyp": "^6.1.0",
"prop-types": "^15.7.2",
"react": "^18.2.0",
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/DataBrokersList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const DataBrokersDB = ({ classes, dataBrokers }) => {
<>
<Image
className={classes.orgLogo}
width='20px'
height='20px'
width='20'
height='20'
src={src}
placeholder="blur"
blurDataURL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mMU3NlZz0AEYBxVSF+FAOEUEj9NKjNZAAAAAElFTkSuQmCC"
Expand Down Expand Up @@ -143,17 +143,17 @@ const DataBrokersDB = ({ classes, dataBrokers }) => {
setSelectedDataBroker(e.data);
};

const Map = dynamic(
() => import("../MainMap"),
const Map = React.useMemo(() => dynamic(
() => import('../MainMap'), // replace '@components/map' with your component's location
{
ssr: false
} // This line is important. It's what prevents server-side render
);
ssr: false // This line is important. It's what prevents server-side render
}
), [selectedDataBroker])

return (
<div className={classes.container}>
<Paper className={classes.inner}>
<Map dataBrokers={dataBrokers} selectedDataBroker={selectedDataBroker} />

<div className={classes.database}>
<Paper className={classes.searchRoot} id="grid-wrapper" elevation={1}>
<SearchIcon />
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const Footer = ({ classes }) => {
id="footer.privacyPolicy"
defaultMessage="<a>Privacy Policy</a>"
values={{
a: txt=> (<Link href="/privacy" ><a className={classes.DisclaimerLink}>{txt}</a></Link>)
a: txt=> (<Link legacyBehavior href="/privacy" ><a className={classes.DisclaimerLink}>{txt}</a></Link>)
}}
/>
</Typography>
Expand All @@ -122,7 +122,7 @@ const Footer = ({ classes }) => {
id="footer.mission"
defaultMessage="<a>Mission</a>"
values={{
a: txt=> (<Link href="/about" ><a className={classes.DisclaimerLink}>{txt}</a></Link>)
a: txt=> (<Link legacyBehavior href="/about" ><a className={classes.DisclaimerLink}>{txt}</a></Link>)
}}
/>
</Typography>
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/MainMap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ const Map = (props) => {
};

const DataBrokersGroup = ({dataBrokers, classes, selectedDataBroker}) => {
const map = useMap();
const groupRef = React.useRef(null);
const dataBrokersWithLocation = dataBrokers.filter((dataBroker) => dataBroker.latlng && dataBroker.latlng.length > 0);

const [markers, setMarkers] = React.useState({})

const markersRef = React.useCallback((dataBroker, marker) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const NavItem = ({
}) => {
return (
<li className={classes.item} onClick={onClickHandler}>
<Link href={href} className={classes.link} passHref>
<Link legacyBehavior href={href} className={classes.link} passHref>
<Typography
component="a"
target={target}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/top-ten.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Brokers = ({ classes, router }) => {
{dataBrokers.map((company) => (
<Grid key={company.domain} item>
<Paper className={classes.paper} elevation={2} >
<Link href={"https://yourdigitalrights.org/d/" + company.domain} passHref>
<Link legacyBehavior href={"https://yourdigitalrights.org/d/" + company.domain} passHref>
<GridListTile
component="a"
target="_blank"
Expand Down

0 comments on commit 6729827

Please sign in to comment.