diff --git a/src/components/Board/Customize/PageMetadata/PageMetadataCustomization.tsx b/src/components/Board/Customize/PageMetadata/PageMetadataCustomization.tsx index a8af57b18..faacf6cd3 100644 --- a/src/components/Board/Customize/PageMetadata/PageMetadataCustomization.tsx +++ b/src/components/Board/Customize/PageMetadata/PageMetadataCustomization.tsx @@ -1,4 +1,4 @@ -import { Grid, Stack, TextInput } from '@mantine/core'; +import { Grid, TextInput } from '@mantine/core'; import { useTranslation } from 'next-i18next'; import { useBoardCustomizationFormContext } from '../form'; diff --git a/src/components/Board/Items/App/Edit/AppereanceTab.tsx b/src/components/Board/Items/App/Edit/AppereanceTab.tsx index 6d61730c5..291c4a391 100644 --- a/src/components/Board/Items/App/Edit/AppereanceTab.tsx +++ b/src/components/Board/Items/App/Edit/AppereanceTab.tsx @@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'; import { IconSelector } from '~/components/IconSelector/IconSelector'; import { appNamePositions, appNameStyles } from '~/server/db/items'; -import { AppForm } from '../EditAppModal'; +import { type AppForm } from '../EditAppModal'; interface AppearanceTabProps { form: AppForm; diff --git a/src/components/Board/Items/App/Edit/BehaviourTab.tsx b/src/components/Board/Items/App/Edit/BehaviourTab.tsx index 207db08cc..e987cab88 100644 --- a/src/components/Board/Items/App/Edit/BehaviourTab.tsx +++ b/src/components/Board/Items/App/Edit/BehaviourTab.tsx @@ -1,8 +1,8 @@ -import { Group, Stack, Switch, Tabs, Text, TextInput, useMantineTheme } from '@mantine/core'; +import { Group, Stack, Switch, Tabs, Text, TextInput } from '@mantine/core'; import { useTranslation } from 'next-i18next'; import { InfoCard } from '~/components/InfoCard/InfoCard'; -import { AppForm } from '../EditAppModal'; +import { type AppForm } from '../EditAppModal'; interface BehaviourTabProps { form: AppForm; diff --git a/src/components/Board/Items/App/Edit/GeneralTab.tsx b/src/components/Board/Items/App/Edit/GeneralTab.tsx index 9f31b80c9..2dca96137 100644 --- a/src/components/Board/Items/App/Edit/GeneralTab.tsx +++ b/src/components/Board/Items/App/Edit/GeneralTab.tsx @@ -3,7 +3,7 @@ import { useDisclosure } from '@mantine/hooks'; import { IconClick, IconCursorText, IconLink } from '@tabler/icons-react'; import { useTranslation } from 'next-i18next'; -import { AppForm } from '../EditAppModal'; +import { type AppForm } from '../EditAppModal'; interface GeneralTabProps { form: AppForm; diff --git a/src/components/Board/Items/App/Edit/NetworkTab.tsx b/src/components/Board/Items/App/Edit/NetworkTab.tsx index a6bbba9a3..509e61c40 100644 --- a/src/components/Board/Items/App/Edit/NetworkTab.tsx +++ b/src/components/Board/Items/App/Edit/NetworkTab.tsx @@ -2,7 +2,7 @@ import { MultiSelect, Stack, Switch, Tabs } from '@mantine/core'; import { useTranslation } from 'next-i18next'; import { statusCodeData } from '~/tools/acceptableStatusCodes'; -import { AppForm } from '../EditAppModal'; +import { type AppForm } from '../EditAppModal'; interface NetworkTabProps { form: AppForm; diff --git a/src/components/Board/Items/App/app-actions.tsx b/src/components/Board/Items/App/app-actions.tsx index 637857544..0dbb91523 100644 --- a/src/components/Board/Items/App/app-actions.tsx +++ b/src/components/Board/Items/App/app-actions.tsx @@ -3,7 +3,7 @@ import { z } from 'zod'; import { api } from '~/utils/api'; import { appFormSchema } from '~/validations/app'; -import { AppItem, EmptySection } from '../../context'; +import { type AppItem, type EmptySection } from '../../context'; type CreateOrUpdateApp = { app: z.infer; diff --git a/src/components/Board/Items/Widget/Inputs/LocationSelection.tsx b/src/components/Board/Items/Widget/Inputs/LocationSelection.tsx index 7218196a0..5fc102d30 100644 --- a/src/components/Board/Items/Widget/Inputs/LocationSelection.tsx +++ b/src/components/Board/Items/Widget/Inputs/LocationSelection.tsx @@ -23,14 +23,13 @@ import { useState } from 'react'; import { InfoCard } from '~/components/InfoCard/InfoCard'; import { City } from '~/server/api/routers/weather'; import { api } from '~/utils/api'; - -import { IntegrationOptionsValueType } from '../WidgetsEditModal'; +import { ILocationOptionValue } from '~/widgets/widgets'; type LocationSelectionProps = { widgetId: string; propName: string; value: any; - handleChange: (key: string, value: IntegrationOptionsValueType) => void; + handleChange: (key: string, value: ILocationOptionValue['defaultValue']) => void; info?: boolean; infoLink?: string; }; @@ -82,8 +81,8 @@ export const LocationSelection = ({ setQuery(ev.currentTarget.value); handleChange(key, { name: ev.currentTarget.value, - longitude: '', - latitude: '', + longitude: 0, + latitude: 0, }); }} /> diff --git a/src/components/Board/gridstack/init-gridstack.ts b/src/components/Board/gridstack/init-gridstack.ts index f6d80008c..3dcaf5696 100644 --- a/src/components/Board/gridstack/init-gridstack.ts +++ b/src/components/Board/gridstack/init-gridstack.ts @@ -1,6 +1,6 @@ -import { GridItemHTMLElement, GridStack, GridStackNode } from 'fily-publish-gridstack'; +import { GridItemHTMLElement, GridStack } from 'fily-publish-gridstack'; import { MutableRefObject, RefObject } from 'react'; -import { Item, Section } from '~/components/Board/context'; +import type { Section } from '~/components/Board/context'; type InitializeGridstackProps = { section: Section; diff --git a/src/components/Board/gridstack/store.tsx b/src/components/Board/gridstack/store.tsx index ff101ecef..a24f1901b 100644 --- a/src/components/Board/gridstack/store.tsx +++ b/src/components/Board/gridstack/store.tsx @@ -1,5 +1,5 @@ +// TODO: This file can be deleted once the new gridstack is fully implemented import { createWithEqualityFn } from 'zustand/traditional'; -import { useConfigContext } from '~/config/provider'; import { GridstackBreakpoints } from '~/constants/gridstack-breakpoints'; export const useGridstackStore = createWithEqualityFn( diff --git a/src/widgets/widgets.ts b/src/widgets/widgets.ts index ff69abf6e..ad6910e7a 100644 --- a/src/widgets/widgets.ts +++ b/src/widgets/widgets.ts @@ -115,9 +115,9 @@ export type ISliderInputOptionValue = { }; // will show a custom location selector -type ILocationOptionValue = { +export type ILocationOptionValue = { type: 'location'; - defaultValue: { latitude: number; longitude: number }; + defaultValue: { latitude: number; longitude: number; name: string }; }; // will show a sortable list that can have sub settings