Skip to content

Commit

Permalink
use sloy-map
Browse files Browse the repository at this point in the history
  • Loading branch information
gcor committed Jan 11, 2024
1 parent 14075f7 commit 5907d53
Show file tree
Hide file tree
Showing 67 changed files with 935 additions and 3,558 deletions.
10 changes: 6 additions & 4 deletions features/About/AboutProjectModal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect } from 'react';
import { SheetModal } from 'sloy-ui';
import { useIsDesktop } from 'sloy-map/helpers/isDesktop';
import { IconType, SheetModal } from 'sloy-ui';
import { Icon } from 'sloy-ui';
import { AboutProjectContent } from 'features/About/AboutProjectContent';
import { Close } from 'sloy-map/components/Close';
import { useIsDesktop } from 'helpers/isDesktop';
import styles from './AboutProjectModal.module.css';

export function AboutProjectModal({ close, isOpened }: { close: VoidFunction; isOpened: boolean }) {
Expand Down Expand Up @@ -33,7 +33,9 @@ export function AboutProjectModal({ close, isOpened }: { close: VoidFunction; is
return (
<>
<div className={styles.aboutProjectModal} role="dialog" aria-modal="true">
<Close close={close} />
<div onClick={close}>
<Icon type={IconType.Close} />
</div>
<AboutProjectContent />
</div>
<div className={styles.backdrop} onClick={close} aria-hidden />
Expand Down
14 changes: 0 additions & 14 deletions features/About/MobileAboutProject.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions features/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

import React, { useCallback, useEffect } from 'react';
import { Provider, useDispatch } from 'react-redux';
import { SloyMap, setConfig, ILayer, OverrideLayersFn } from 'sloy-map';
import { store } from 'state/redux';
import { AboutProjectIcons } from 'features/About/AboutProjectIcons/AboutProjectIcons';
import { Footer } from 'features/Footer/Footer';
import { SloyMap } from 'sloy-map/SloyMap';
import { setConfig } from 'sloy-map/state/slice';
import { ILayer, OverrideLayersFn } from 'sloy-map/types';
import { state } from 'state/config';
import facades from 'public/ekb-facades.json';
import { CENTER_COORDS, MAX_ZOOM, MIN_ZOOM } from 'constants/map';
import { overrideCard } from './CustomCardContent/overrideCard';
import { QuarterFilter } from './CustomFilterContent/QuarterFilter';
import { FacadeFilter } from './CustomFilterContent/FacadeFilter';
import { getHouseMeta } from './Buildings/houseBase';
import 'sloy-map/style.css';

function AppMap() {
const dispatch = useDispatch();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useMemo } from 'react';
import { Tag } from 'sloy-ui';
import { getYearNameByValue } from 'sloy-map';
import { Info } from 'features/CustomCardContent/Info/Info';
import { getYearNameByValue } from 'sloy-map/helpers/getYearNameByValue';
import { DTPParticipant, HealthStatusType } from '../Participants.types';
import styles from './Participant.module.css';

Expand Down
2 changes: 1 addition & 1 deletion features/CustomCardContent/overrideCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Tag } from 'sloy-ui';
import { OverrideCardFn } from 'sloy-map';
import HealthProgress from 'features/CustomCardContent/HealthProgress/HealthProgress';
import { DownloadButton } from 'features/CustomCardContent/DownloadButton/DownloadButton';
import { OverrideCardFn } from 'sloy-map/types';
import { FeedbackButton } from 'features/CustomCardContent/FeedbackButton/FeedbackButton';
import facades from 'public/ekb-facades.json';
import styles from 'features/CustomCardContent/CardContent.module.css';
Expand Down
5 changes: 5 additions & 0 deletions helpers/isDesktop.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { useMediaQuery } from '@uidotdev/usehooks';

export const useIsDesktop = () => {
return useMediaQuery('only screen and (min-width : 1024px)');
};
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,18 @@
},
"dependencies": {
"@reduxjs/toolkit": "^2.0.1",
"@uidotdev/usehooks": "^2.4.1",
"classnames": "^2.4.0",
"ekb": "1.2.0-rc.2",
"geojson": "^0.5.0",
"lodash": "^4.17.21",
"mapbox-gl": "npm:[email protected]",
"maplibre-gl": "^3.6.2",
"next": "14.0.4",
"proj4": "^2.9.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-map-gl": "7.1.3",
"react-redux": "^9.0.4",
"redux": "^5.0.1",
"sloy-ui": "0.0.1-rc.1",
"sloy-map": "0.0.1-rc.3",
"sloy-ui": "0.0.1-rc.2",
"styled-components": "^6.1.6",
"swr": "^2.2.4",
"typescript": "^5.3.3"
},
"devDependencies": {
Expand All @@ -54,9 +50,5 @@
"postcss-nesting": "^12.0.2",
"postcss-preset-env": "^9.3.0",
"prettier": "3.1.1"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
105 changes: 64 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

1 comment on commit 5907d53

@ekbdev
Copy link

@ekbdev ekbdev commented on 5907d53 Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for map ready!

✅ Preview
https://map-gxedl4cl7-ekbdev.vercel.app
https://ekbdev-map-refactor3.vercel.app

Built with commit 5907d53.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.