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 8a40eca
Show file tree
Hide file tree
Showing 66 changed files with 105 additions and 2,385 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)');
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"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",
Expand All @@ -28,7 +29,8 @@
"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.1",
"sloy-ui": "0.0.1-rc.2",
"styled-components": "^6.1.6",
"swr": "^2.2.4",
"typescript": "^5.3.3"
Expand Down
87 changes: 85 additions & 2 deletions pnpm-lock.yaml

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

91 changes: 0 additions & 91 deletions sloy-map/SloyMap.tsx

This file was deleted.

37 changes: 0 additions & 37 deletions sloy-map/components/Close/Close.module.css

This file was deleted.

Loading

1 comment on commit 8a40eca

@ekbdev
Copy link

@ekbdev ekbdev commented on 8a40eca 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-k1nzb6akc-ekbdev.vercel.app
https://ekbdev-map-refactor3.vercel.app

Built with commit 8a40eca.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.