Skip to content

Commit

Permalink
Merge branch 'development' into feature/893/filter_url_param
Browse files Browse the repository at this point in the history
  • Loading branch information
snturk authored Feb 14, 2023
2 parents 1b00920 + 2d8b306 commit 202e11d
Show file tree
Hide file tree
Showing 8 changed files with 782 additions and 25 deletions.
3 changes: 0 additions & 3 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const path = require("path");

module.exports = {
i18n: {
defaultLocale: "tr",
locales: ["en", "tr"],
localePath: path.resolve("./public/locales"),
},
};
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = withPWA({
module.exports = {
images: {
loader: "akamai",
path: "",
path: ".",
},
i18n,
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"devDependencies": {
"@capacitor/cli": "4.6.3",
"@commitlint/cli": "^17.4.3",
"@commitlint/config-conventional": "^17.4.3",
"@emotion/cache": "11.10.5",
"@emotion/react": "11.10.5",
"@emotion/server": "11.10.0",
Expand Down
Binary file modified public/images/icon-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/icon-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions src/pages/newlayout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import Map from "@/components/UI/Map/Map";
import useDefaultZoom from "@/hooks/useDefaultZoom";
import useDefaultCenter from "@/hooks/useDefaultCenter";
import { useDevice } from "@/stores/mapStore";
import {
DEFAULT_MIN_ZOOM_DESKTOP,
DEFAULT_MIN_ZOOM_MOBILE,
} from "@/components/UI/Map/utils";
import { TileLayer } from "react-leaflet";

const NHome = () => {
const { defaultZoom } = useDefaultZoom();
const { defaultCenter } = useDefaultCenter();
const device = useDevice();
return (
<>
<Map
center={defaultCenter}
zoom={defaultZoom}
minZoom={
device === "desktop"
? DEFAULT_MIN_ZOOM_DESKTOP
: DEFAULT_MIN_ZOOM_MOBILE
}
zoomSnap={1}
zoomDelta={1}
preferCanvas
maxBoundsViscosity={1}
maxZoom={18}
whenReady={(map: any) => {
setTimeout(() => {
map.target.invalidateSize();
}, 100);
}}
>
<TileLayer
url={`https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&apistyle=s.e%3Al.i%7Cp.v%3Aoff%2Cs.t%3A3%7Cs.e%3Ag%7C`}
/>
</Map>
</>
);
};
export default NHome;
2 changes: 1 addition & 1 deletion src/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MINUTES_IN_SEC = 60;

export const getTimeAgo = (value: string, locale: string = "tr") => {
const now = new Date().getTime();
const valueZtoGMT3 = value.replace("Z", "+03:00");
const valueZtoGMT3 = value?.replace("Z", "+03:00");
const valueTime = new Date(valueZtoGMT3).getTime();

if (!valueTime) return null;
Expand Down
Loading

0 comments on commit 202e11d

Please sign in to comment.