Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

refactor: types

anandbaburajan3ee233875261
diff --git a/web/apps/photos/src/components/TripTemplate/MapContainer.tsx b/web/apps/photos/src/components/TripTemplate/MapContainer.tsx
deleted file mode 100644
index 6412ef43b6..0000000000
--- a/web/apps/photos/src/components/TripTemplate/MapContainer.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import dynamic from "next/dynamic";
-
-export const MapContainer = dynamic(
- () => import("react-leaflet").then((mod) => mod.MapContainer),
- { ssr: false },
-);
-
-export const TileLayer = dynamic(
- () => import("react-leaflet").then((mod) => mod.TileLayer),
- { ssr: false },
-);
-
-export const Marker = dynamic(
- () => import("react-leaflet").then((mod) => mod.Marker),
- { ssr: false },
-);
\ No newline at end of file
diff --git a/web/apps/photos/src/components/TripTemplate/TimelineBaseLine.tsx b/web/apps/photos/src/components/TripTemplate/TimelineBaseLine.tsx
index a0bdcbc6d1..5e014cd448 100644
--- a/web/apps/photos/src/components/TripTemplate/TimelineBaseLine.tsx
+++ b/web/apps/photos/src/components/TripTemplate/TimelineBaseLine.tsx
@@ -47,7 +47,7 @@ export const TimelineBaseLine = memo<TimelineBaseLineProps>(({
});
// Styled components
-const BaseLine = styled(Box)(({ theme }) => ({
+const BaseLine = styled(Box)(() => ({
position: "absolute",
left: "50%",
transform: "translateX(-1.5px)",
diff --git a/web/apps/photos/src/components/TripTemplate/TripCover.tsx b/web/apps/photos/src/components/TripTemplate/TripCover.tsx
index d92b15f08c..f97c576ec4 100644
--- a/web/apps/photos/src/components/TripTemplate/TripCover.tsx
+++ b/web/apps/photos/src/components/TripTemplate/TripCover.tsx
@@ -105,7 +105,7 @@ const ContentContainer = styled(Box)({
const TripTitle = styled(Typography)({
fontSize: "30px",
fontWeight: "bold",
- marginBottom: "2px",
+ marginBottom: "12px",
component: "h1",
});
diff --git a/web/apps/photos/src/components/TripTemplate/types.ts b/web/apps/photos/src/components/TripTemplate/types.ts
index fbb9a8cb1e..704218be76 100644
--- a/web/apps/photos/src/components/TripTemplate/types.ts
+++ b/web/apps/photos/src/components/TripTemplate/types.ts
@@ -1,6 +1,3 @@
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
-
export interface JourneyPoint {
lat: number;
lng: number;
@@ -9,28 +6,4 @@ export interface JourneyPoint {
timestamp: string;
image: string;
fileId: number;
-}
-
-export interface GeocodingResponse {
- features?: {
- properties?: {
- locality?: string;
- neighbourhood?: string;
- county?: string;
- region?: string;
- name?: string;
- country?: string;
- };
- }[];
-}
-
-export interface TripTemplateProps {
- files: EnteFile[];
- collection?: Collection;
- albumTitle?: string;
- user?: { id: number; email: string; token: string; [key: string]: unknown };
- enableDownload?: boolean;
- onSetOpenFileViewer?: (open: boolean) => void;
- onRemotePull?: () => Promise<void>;
- onAddPhotos?: () => void;
}
\ No newline at end of file
diff --git a/web/apps/photos/src/components/TripTemplate/utils.ts b/web/apps/photos/src/components/TripTemplate/utils.ts
index 1b60e4af07..02a4d365c9 100644
--- a/web/apps/photos/src/components/TripTemplate/utils.ts
+++ b/web/apps/photos/src/components/TripTemplate/utils.ts
@@ -1,5 +1,17 @@
import L from "leaflet";
-import type { GeocodingResponse } from "./types";
+
+interface GeocodingResponse {
+ features?: {
+ properties?: {
+ locality?: string;
+ neighbourhood?: string;
+ county?: string;
+ region?: string;
+ name?: string;
+ country?: string;
+ };
+ }[];
+}
// Geocoding cache to avoid repeated API calls
export const geocodingCache = new Map<string, { place: string; country: string }>();