@jjlmoya/utils-drones 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -14,7 +14,8 @@ import type { UtilitySEOContent } from "@jjlmoya/utils-shared";
|
|
|
14
14
|
export async function getStaticPaths() {
|
|
15
15
|
const paths = [];
|
|
16
16
|
|
|
17
|
-
for (const { entry, Component } of ALL_TOOLS) {
|
|
17
|
+
for (const { entry, Component: lazyComp } of ALL_TOOLS) {
|
|
18
|
+
const { default: Component } = await lazyComp();
|
|
18
19
|
const localeEntries = Object.entries(entry.i18n) as [
|
|
19
20
|
KnownLocale,
|
|
20
21
|
() => Promise<ToolLocaleContent>,
|
|
@@ -52,8 +53,6 @@ export async function getStaticPaths() {
|
|
|
52
53
|
return paths;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
type ToolComponent = (props: { ui: Record<string, string> }) => unknown;
|
|
56
|
-
|
|
57
56
|
interface NavItem {
|
|
58
57
|
id: string;
|
|
59
58
|
title: string;
|
|
@@ -62,7 +61,7 @@ interface NavItem {
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
interface Props {
|
|
65
|
-
Component:
|
|
64
|
+
Component: unknown;
|
|
66
65
|
locale: KnownLocale;
|
|
67
66
|
content: ToolLocaleContent;
|
|
68
67
|
localeUrls: Partial<Record<KnownLocale, string>>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { DronesToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
|
|
2
|
-
import AntennaLengthCalculatorComponent from './component.astro';
|
|
3
|
-
import AntennaLengthCalculatorSEO from './seo.astro';
|
|
4
|
-
import AntennaLengthCalculatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface AntennaLengthCalculatorUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -33,7 +30,7 @@ export const antennaLengthCalculator: DronesToolEntry<AntennaLengthCalculatorUI>
|
|
|
33
30
|
|
|
34
31
|
export const ANTENNA_LENGTH_CALCULATOR_TOOL: ToolDefinition = {
|
|
35
32
|
entry: antennaLengthCalculator,
|
|
36
|
-
Component:
|
|
37
|
-
SEOComponent:
|
|
38
|
-
BibliographyComponent:
|
|
33
|
+
Component: () => import('./component.astro'),
|
|
34
|
+
SEOComponent: () => import('./seo.astro'),
|
|
35
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
39
36
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { DronesToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
|
|
2
|
-
import DroneFlightTimeComponent from './component.astro';
|
|
3
|
-
import DroneFlightTimeSEO from './seo.astro';
|
|
4
|
-
import DroneFlightTimeBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface DroneFlightTimeUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -33,7 +30,7 @@ export const droneFlightTime: DronesToolEntry<DroneFlightTimeUI> = {
|
|
|
33
30
|
|
|
34
31
|
export const DRONE_FLIGHT_TIME_TOOL: ToolDefinition = {
|
|
35
32
|
entry: droneFlightTime,
|
|
36
|
-
Component:
|
|
37
|
-
SEOComponent:
|
|
38
|
-
BibliographyComponent:
|
|
33
|
+
Component: () => import('./component.astro'),
|
|
34
|
+
SEOComponent: () => import('./seo.astro'),
|
|
35
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
39
36
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { DronesToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
|
|
2
|
-
import GpsCoordinatesConverterComponent from './component.astro';
|
|
3
|
-
import GpsCoordinatesConverterSEO from './seo.astro';
|
|
4
|
-
import GpsCoordinatesConverterBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
export interface GpsCoordinatesConverterUI {
|
|
7
4
|
[key: string]: string;
|
|
@@ -33,7 +30,7 @@ export const gpsCoordinatesConverter: DronesToolEntry<GpsCoordinatesConverterUI>
|
|
|
33
30
|
|
|
34
31
|
export const GPS_COORDINATES_CONVERTER_TOOL: ToolDefinition = {
|
|
35
32
|
entry: gpsCoordinatesConverter,
|
|
36
|
-
Component:
|
|
37
|
-
SEOComponent:
|
|
38
|
-
BibliographyComponent:
|
|
33
|
+
Component: () => import('./component.astro'),
|
|
34
|
+
SEOComponent: () => import('./seo.astro'),
|
|
35
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
39
36
|
};
|