From 79ca17aa3f0b47b095874c7239c1c14b7dcb10a8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 10 Feb 2025 11:39:07 +0000 Subject: [PATCH] fix types import path --- src/Components/AppShell/AppShell.tsx | 2 +- src/Components/AppShell/NavBar.tsx | 2 +- src/Components/AppShell/SetAppState.tsx | 2 +- src/Components/AppShell/hooks/useAppState.tsx | 2 +- src/Components/AppShell/hooks/useAssets.tsx | 2 +- src/Components/Auth/useAuth.tsx | 4 ++-- src/Components/Gaming/Quests.tsx | 2 +- src/Components/Map/ItemForm.tsx | 2 +- src/Components/Map/ItemView.tsx | 2 +- src/Components/Map/Layer.tsx | 6 +++--- src/Components/Map/Permissions.tsx | 4 ++-- .../Map/Subcomponents/Controls/SearchControl.tsx | 2 +- src/Components/Map/Subcomponents/ItemFormPopup.tsx | 4 ++-- .../Subcomponents/ItemPopupComponents/HeaderView.tsx | 4 ++-- .../Subcomponents/ItemPopupComponents/PopupButton.tsx | 2 +- .../ItemPopupComponents/PopupCheckboxInput.tsx | 2 +- .../ItemPopupComponents/PopupStartEndInput.tsx | 2 +- .../ItemPopupComponents/PopupTextAreaInput.tsx | 2 +- .../ItemPopupComponents/PopupTextInput.tsx | 2 +- .../Subcomponents/ItemPopupComponents/StartEndView.tsx | 2 +- .../Map/Subcomponents/ItemPopupComponents/TextView.tsx | 4 ++-- src/Components/Map/Subcomponents/ItemViewPopup.tsx | 4 ++-- src/Components/Map/Tags.tsx | 4 ++-- src/Components/Map/UtopiaMap.tsx | 2 +- src/Components/Map/UtopiaMapInner.tsx | 4 ++-- src/Components/Map/hooks/useFilter.tsx | 4 ++-- src/Components/Map/hooks/useItems.tsx | 4 ++-- src/Components/Map/hooks/useLayers.tsx | 2 +- src/Components/Map/hooks/useLeafletRefs.tsx | 2 +- src/Components/Map/hooks/usePermissions.tsx | 10 +++++----- src/Components/Map/hooks/useSelectPosition.tsx | 6 +++--- src/Components/Map/hooks/useTags.tsx | 6 +++--- src/Components/Profile/ProfileForm.tsx | 4 ++-- src/Components/Profile/ProfileView.tsx | 6 +++--- src/Components/Profile/Subcomponents/ActionsButton.tsx | 2 +- .../Profile/Subcomponents/ContactInfoForm.tsx | 2 +- .../Profile/Subcomponents/ContactInfoView.tsx | 2 +- src/Components/Profile/Subcomponents/GalleryView.tsx | 2 +- .../Profile/Subcomponents/GroupSubHeaderView.tsx | 2 +- .../Profile/Subcomponents/GroupSubheaderForm.tsx | 4 ++-- .../Profile/Subcomponents/LinkedItemsHeaderView.tsx | 2 +- src/Components/Profile/Subcomponents/PlusButton.tsx | 2 +- .../Profile/Subcomponents/ProfileStartEndForm.tsx | 2 +- .../Profile/Subcomponents/ProfileStartEndView.tsx | 2 +- .../Profile/Subcomponents/ProfileTextForm.tsx | 2 +- .../Profile/Subcomponents/ProfileTextView.tsx | 2 +- src/Components/Profile/Subcomponents/TagsWidget.tsx | 2 +- src/Components/Profile/Templates/FlexForm.tsx | 4 ++-- src/Components/Profile/Templates/FlexView.tsx | 2 +- src/Components/Profile/Templates/OnepagerForm.tsx | 4 ++-- src/Components/Profile/Templates/OnepagerView.tsx | 2 +- src/Components/Profile/Templates/SimpleView.tsx | 2 +- src/Components/Profile/Templates/TabsView.tsx | 4 ++-- src/Components/Profile/UserSettings.tsx | 2 +- src/Components/Profile/itemFunctions.ts | 2 +- src/Components/Templates/AttestationForm.tsx | 4 ++-- src/Components/Templates/DateUserInfo.tsx | 2 +- src/Components/Templates/ItemCard.tsx | 2 +- src/Components/Templates/MarketView.tsx | 2 +- src/Components/Templates/OverlayItemsIndexPage.tsx | 2 +- src/Components/Templates/TagView.tsx | 2 +- 61 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/Components/AppShell/AppShell.tsx b/src/Components/AppShell/AppShell.tsx index 5267a48d..0421a302 100644 --- a/src/Components/AppShell/AppShell.tsx +++ b/src/Components/AppShell/AppShell.tsx @@ -2,7 +2,7 @@ import { ContextWrapper } from './ContextWrapper' import NavBar from './NavBar' import { SetAppState } from './SetAppState' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' export function AppShell({ appName, diff --git a/src/Components/AppShell/NavBar.tsx b/src/Components/AppShell/NavBar.tsx index f25d532a..08971877 100644 --- a/src/Components/AppShell/NavBar.tsx +++ b/src/Components/AppShell/NavBar.tsx @@ -6,7 +6,7 @@ import { toast } from 'react-toastify' import { useAuth } from '#components/Auth' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export default function NavBar({ appName, userType }: { appName: string; userType: string }) { const { isAuthenticated, user, logout } = useAuth() diff --git a/src/Components/AppShell/SetAppState.tsx b/src/Components/AppShell/SetAppState.tsx index a84ec067..eb537911 100644 --- a/src/Components/AppShell/SetAppState.tsx +++ b/src/Components/AppShell/SetAppState.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { useSetAppState } from './hooks/useAppState' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' export const SetAppState = ({ assetsApi, diff --git a/src/Components/AppShell/hooks/useAppState.tsx b/src/Components/AppShell/hooks/useAppState.tsx index f0ffd76d..c338d8c4 100644 --- a/src/Components/AppShell/hooks/useAppState.tsx +++ b/src/Components/AppShell/hooks/useAppState.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' interface AppState { assetsApi: AssetsApi diff --git a/src/Components/AppShell/hooks/useAssets.tsx b/src/Components/AppShell/hooks/useAssets.tsx index 04b3d3f2..6c04d6ab 100644 --- a/src/Components/AppShell/hooks/useAssets.tsx +++ b/src/Components/AppShell/hooks/useAssets.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' type UseAssetManagerResult = ReturnType diff --git a/src/Components/Auth/useAuth.tsx b/src/Components/Auth/useAuth.tsx index 767ce700..e892a0c6 100644 --- a/src/Components/Auth/useAuth.tsx +++ b/src/Components/Auth/useAuth.tsx @@ -5,8 +5,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { createContext, useState, useContext, useEffect } from 'react' -import type { UserApi } from '#src/types/UserApi' -import type { UserItem } from '#src/types/UserItem' +import type { UserApi } from '#types/UserApi' +import type { UserItem } from '#types/UserItem' interface AuthProviderProps { userApi: UserApi diff --git a/src/Components/Gaming/Quests.tsx b/src/Components/Gaming/Quests.tsx index 61303c30..0e669c6f 100644 --- a/src/Components/Gaming/Quests.tsx +++ b/src/Components/Gaming/Quests.tsx @@ -5,7 +5,7 @@ import { useItems } from '#components/Map/hooks/useItems' import { useQuestsOpen, useSetQuestOpen } from './hooks/useQuests' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function Quests() { const questsOpen = useQuestsOpen() diff --git a/src/Components/Map/ItemForm.tsx b/src/Components/Map/ItemForm.tsx index f9ad282f..d48b33ce 100644 --- a/src/Components/Map/ItemForm.tsx +++ b/src/Components/Map/ItemForm.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement, useEffect } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemForm = ({ children, diff --git a/src/Components/Map/ItemView.tsx b/src/Components/Map/ItemView.tsx index 9a674504..63a241d6 100644 --- a/src/Components/Map/ItemView.tsx +++ b/src/Components/Map/ItemView.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemView = ({ children, item }: { children?: React.ReactNode; item?: Item }) => { return ( diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index d2525df8..0ce40aef 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -28,9 +28,9 @@ import { useAddTag, useAllTagsLoaded, useGetItemTags, useTags } from './hooks/us import { ItemFormPopup } from './Subcomponents/ItemFormPopup' import { ItemViewPopup } from './Subcomponents/ItemViewPopup' -import type { Item } from '#src/types/Item' -import type { LayerProps } from '#src/types/LayerProps' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { LayerProps } from '#types/LayerProps' +import type { Tag } from '#types/Tag' import type { Popup } from 'leaflet' export const Layer = ({ diff --git a/src/Components/Map/Permissions.tsx b/src/Components/Map/Permissions.tsx index 90ba458f..cac67cf2 100644 --- a/src/Components/Map/Permissions.tsx +++ b/src/Components/Map/Permissions.tsx @@ -4,8 +4,8 @@ import { useAuth } from '#components/Auth' import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './hooks/usePermissions' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Permission } from '#src/types/Permission' +import type { ItemsApi } from '#types/ItemsApi' +import type { Permission } from '#types/Permission' export function Permissions({ data, diff --git a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx index 615527ac..323d8c5c 100644 --- a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx @@ -29,7 +29,7 @@ import MarkerIconFactory from '#utils/MarkerIconFactory' import { LocateControl } from './LocateControl' import { SidebarControl } from './SidebarControl' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const SearchControl = () => { const windowDimensions = useWindowDimensions() diff --git a/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/src/Components/Map/Subcomponents/ItemFormPopup.tsx index a8557695..ed35d861 100644 --- a/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -19,8 +19,8 @@ import { useAddTag, useTags } from '#components/Map/hooks/useTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' export function ItemFormPopup(props: ItemFormPopupProps) { const [spinner, setSpinner] = useState(false) diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx index e948b396..b7602afc 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx @@ -17,8 +17,8 @@ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' export function HeaderView({ item, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx index 7ef100ab..3f3bf2da 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom' import { useGetItemTags } from '#components/Map/hooks/useTags' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupButton = ({ url, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx index 87a28c1f..42a1d6ca 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx @@ -1,4 +1,4 @@ -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupCheckboxInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx index 5c87b01e..819182d6 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ import { TextInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' interface StartEndInputProps { item?: Item diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx index b403bc31..c07b6b26 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx @@ -1,6 +1,6 @@ import { TextAreaInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupTextAreaInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx index ce957842..4030769f 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx @@ -1,6 +1,6 @@ import { TextInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupTextInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx index 02b21cb1..c41d86f4 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const StartEndView = ({ item }: { item?: Item }) => { return ( diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx index 0dbb3ffc..59115151 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx @@ -16,8 +16,8 @@ import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' import { fixUrls, mailRegex } from '#utils/ReplaceURLs' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export const TextView = ({ item, diff --git a/src/Components/Map/Subcomponents/ItemViewPopup.tsx b/src/Components/Map/Subcomponents/ItemViewPopup.tsx index ac484ad3..2a935e48 100644 --- a/src/Components/Map/Subcomponents/ItemViewPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemViewPopup.tsx @@ -20,8 +20,8 @@ import { timeAgo } from '#utils/TimeAgo' import { HeaderView } from './ItemPopupComponents/HeaderView' import { TextView } from './ItemPopupComponents/TextView' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' export interface ItemViewPopupProps { item: Item diff --git a/src/Components/Map/Tags.tsx b/src/Components/Map/Tags.tsx index 1195a0c2..ff77a3ff 100644 --- a/src/Components/Map/Tags.tsx +++ b/src/Components/Map/Tags.tsx @@ -4,8 +4,8 @@ import { useLocation } from 'react-router-dom' import { useAddFilterTag, useFilterTags, useResetFilterTags } from './hooks/useFilter' import { useSetTagData, useSetTagApi, useTags } from './hooks/useTags' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' export function Tags({ data, api }: { data?: Tag[]; api?: ItemsApi }) { const setTagData = useSetTagData() diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 1991df87..5fcb292d 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -5,7 +5,7 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper' import { UtopiaMapInner } from './UtopiaMapInner' -import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' +import type { UtopiaMapProps } from '#types/UtopiaMapProps' import 'react-toastify/dist/ReactToastify.css' function UtopiaMap({ diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index bd17434c..6cdf9106 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -36,8 +36,8 @@ import { TagsControl } from './Subcomponents/Controls/TagsControl' import { TextView } from './Subcomponents/ItemPopupComponents/TextView' import { SelectPosition } from './Subcomponents/SelectPosition' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' -import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { UtopiaMapProps } from '#types/UtopiaMapProps' import type { Feature, Geometry as GeoJSONGeometry } from 'geojson' export function UtopiaMapInner({ diff --git a/src/Components/Map/hooks/useFilter.tsx b/src/Components/Map/hooks/useFilter.tsx index e05bc542..febc6bfd 100644 --- a/src/Components/Map/hooks/useFilter.tsx +++ b/src/Components/Map/hooks/useFilter.tsx @@ -10,8 +10,8 @@ import { useNavigate } from 'react-router-dom' import { useLayers } from './useLayers' import useWindowDimensions from './useWindowDimension' -import type { LayerProps } from '#src/types/LayerProps' -import type { Tag } from '#src/types/Tag' +import type { LayerProps } from '#types/LayerProps' +import type { Tag } from '#types/Tag' type ActionType = | { type: 'ADD_TAG'; tag: Tag } diff --git a/src/Components/Map/hooks/useItems.tsx b/src/Components/Map/hooks/useItems.tsx index 9517ef78..db174e77 100644 --- a/src/Components/Map/hooks/useItems.tsx +++ b/src/Components/Map/hooks/useItems.tsx @@ -10,8 +10,8 @@ import { toast } from 'react-toastify' import { useAddLayer } from './useLayers' -import type { Item } from '#src/types/Item' -import type { LayerProps } from '#src/types/LayerProps' +import type { Item } from '#types/Item' +import type { LayerProps } from '#types/LayerProps' type ActionType = | { type: 'ADD'; item: Item } diff --git a/src/Components/Map/hooks/useLayers.tsx b/src/Components/Map/hooks/useLayers.tsx index 711a95be..477ffc64 100644 --- a/src/Components/Map/hooks/useLayers.tsx +++ b/src/Components/Map/hooks/useLayers.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { LayerProps } from '#src/types/LayerProps' +import type { LayerProps } from '#types/LayerProps' interface ActionType { type: 'ADD LAYER' diff --git a/src/Components/Map/hooks/useLeafletRefs.tsx b/src/Components/Map/hooks/useLeafletRefs.tsx index 93a1c130..a092d98e 100644 --- a/src/Components/Map/hooks/useLeafletRefs.tsx +++ b/src/Components/Map/hooks/useLeafletRefs.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' import type { Marker, Popup } from 'leaflet' interface LeafletRef { diff --git a/src/Components/Map/hooks/usePermissions.tsx b/src/Components/Map/hooks/usePermissions.tsx index 6d413b7c..5d149eb3 100644 --- a/src/Components/Map/hooks/usePermissions.tsx +++ b/src/Components/Map/hooks/usePermissions.tsx @@ -10,11 +10,11 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { useAuth } from '#components/Auth/useAuth' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { LayerProps } from '#src/types/LayerProps' -import type { Permission } from '#src/types/Permission' -import type { PermissionAction } from '#src/types/PermissionAction' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { LayerProps } from '#types/LayerProps' +import type { Permission } from '#types/Permission' +import type { PermissionAction } from '#types/PermissionAction' type ActionType = { type: 'ADD'; permission: Permission } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Map/hooks/useSelectPosition.tsx b/src/Components/Map/hooks/useSelectPosition.tsx index 982a3962..d00fa4d9 100644 --- a/src/Components/Map/hooks/useSelectPosition.tsx +++ b/src/Components/Map/hooks/useSelectPosition.tsx @@ -14,9 +14,9 @@ import { toast } from 'react-toastify' import { useUpdateItem } from './useItems' import { useHasUserPermission } from './usePermissions' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' -import type { LayerProps } from '#src/types/LayerProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { LayerProps } from '#types/LayerProps' import type { Point } from 'geojson' import type { LatLng } from 'leaflet' diff --git a/src/Components/Map/hooks/useTags.tsx b/src/Components/Map/hooks/useTags.tsx index 9420ce01..f80e96ad 100644 --- a/src/Components/Map/hooks/useTags.tsx +++ b/src/Components/Map/hooks/useTags.tsx @@ -13,9 +13,9 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' type ActionType = { type: 'ADD'; tag: Tag } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Profile/ProfileForm.tsx b/src/Components/Profile/ProfileForm.tsx index c4eb2c6a..c5339657 100644 --- a/src/Components/Profile/ProfileForm.tsx +++ b/src/Components/Profile/ProfileForm.tsx @@ -23,8 +23,8 @@ import { OnepagerForm } from './Templates/OnepagerForm' import { SimpleForm } from './Templates/SimpleForm' import { TabsForm } from './Templates/TabsForm' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export function ProfileForm() { const [state, setState] = useState({ diff --git a/src/Components/Profile/ProfileView.tsx b/src/Components/Profile/ProfileView.tsx index ca9e072d..76c42aec 100644 --- a/src/Components/Profile/ProfileView.tsx +++ b/src/Components/Profile/ProfileView.tsx @@ -29,9 +29,9 @@ import { OnepagerView } from './Templates/OnepagerView' import { SimpleView } from './Templates/SimpleView' import { TabsView } from './Templates/TabsView' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi }) { const [item, setItem] = useState() diff --git a/src/Components/Profile/Subcomponents/ActionsButton.tsx b/src/Components/Profile/Subcomponents/ActionsButton.tsx index 6452f741..7eea5e44 100644 --- a/src/Components/Profile/Subcomponents/ActionsButton.tsx +++ b/src/Components/Profile/Subcomponents/ActionsButton.tsx @@ -12,7 +12,7 @@ import { HeaderView } from '#components/Map/Subcomponents/ItemPopupComponents/He import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function ActionButton({ item, diff --git a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx index 2081567e..7f129d01 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { TextInput } from '#components/Input' -import type { FormState } from '#src/types/FormState' +import type { FormState } from '#types/FormState' export const ContactInfoForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ContactInfoView.tsx b/src/Components/Profile/Subcomponents/ContactInfoView.tsx index 01f2dfb5..a8368d24 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoView.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoView.tsx @@ -8,7 +8,7 @@ import { Link } from 'react-router-dom' import { useAppState } from '#components/AppShell/hooks/useAppState' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ContactInfoView = ({ item, heading }: { item: Item; heading: string }) => { const appState = useAppState() diff --git a/src/Components/Profile/Subcomponents/GalleryView.tsx b/src/Components/Profile/Subcomponents/GalleryView.tsx index f6fee269..7cf2bc37 100644 --- a/src/Components/Profile/Subcomponents/GalleryView.tsx +++ b/src/Components/Profile/Subcomponents/GalleryView.tsx @@ -10,7 +10,7 @@ import 'react-photo-album/rows.css' import { useAppState } from '#components/AppShell/hooks/useAppState' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const GalleryView = ({ item }: { item: Item }) => { const [index, setIndex] = useState(-1) diff --git a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx index 6c808314..7718b075 100644 --- a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx @@ -1,6 +1,6 @@ import SocialShareBar from './SocialShareBar' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const GroupSubHeaderView = ({ item, diff --git a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx index db2e663b..55b8c58f 100644 --- a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx @@ -5,8 +5,8 @@ import { useEffect } from 'react' import ComboBoxInput from '#components/Input/ComboBoxInput' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' interface groupType { groupTypes_id: { diff --git a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx index 626f0ba7..57dd0ce9 100644 --- a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx @@ -10,7 +10,7 @@ import { useEffect } from 'react' import { useAppState } from '#components/AppShell/hooks/useAppState' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function LinkedItemsHeaderView({ item, diff --git a/src/Components/Profile/Subcomponents/PlusButton.tsx b/src/Components/Profile/Subcomponents/PlusButton.tsx index 06fa6e34..c8122d95 100644 --- a/src/Components/Profile/Subcomponents/PlusButton.tsx +++ b/src/Components/Profile/Subcomponents/PlusButton.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' -import type { LayerProps } from '#src/types/LayerProps' +import type { LayerProps } from '#types/LayerProps' export function PlusButton({ layer, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx index 5ccc1384..e5f67ffe 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { PopupStartEndInput } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileStartEndForm = ({ item, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx index 95425563..8d64e55d 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx @@ -1,6 +1,6 @@ import { StartEndView } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileStartEndView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx index b74c01d4..1d72a3b3 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx @@ -9,7 +9,7 @@ import { getValue } from '#utils/GetValue' import { MarkdownHint } from './MarkdownHint' -import type { FormState } from '#src/types/FormState' +import type { FormState } from '#types/FormState' export const ProfileTextForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ProfileTextView.tsx b/src/Components/Profile/Subcomponents/ProfileTextView.tsx index 75dc8ca1..8a2725ce 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextView.tsx @@ -2,7 +2,7 @@ import { TextView } from '#components/Map' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileTextView = ({ item, diff --git a/src/Components/Profile/Subcomponents/TagsWidget.tsx b/src/Components/Profile/Subcomponents/TagsWidget.tsx index 48850c0c..b1a03ad1 100644 --- a/src/Components/Profile/Subcomponents/TagsWidget.tsx +++ b/src/Components/Profile/Subcomponents/TagsWidget.tsx @@ -11,7 +11,7 @@ import { useTags } from '#components/Map/hooks/useTags' import { decodeTag, encodeTag } from '#utils/FormatTags' import { randomColor } from '#utils/RandomColor' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' // eslint-disable-next-line react/prop-types export const TagsWidget = ({ placeholder, containerStyle, defaultTags, onUpdate }) => { diff --git a/src/Components/Profile/Templates/FlexForm.tsx b/src/Components/Profile/Templates/FlexForm.tsx index 0d6aa9c6..56f14eac 100644 --- a/src/Components/Profile/Templates/FlexForm.tsx +++ b/src/Components/Profile/Templates/FlexForm.tsx @@ -8,8 +8,8 @@ import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubhe import { ProfileStartEndForm } from '#components/Profile/Subcomponents/ProfileStartEndForm' import { ProfileTextForm } from '#components/Profile/Subcomponents/ProfileTextForm' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' const componentMap = { groupSubheaders: GroupSubheaderForm, diff --git a/src/Components/Profile/Templates/FlexView.tsx b/src/Components/Profile/Templates/FlexView.tsx index 08c35f26..608b0fdf 100644 --- a/src/Components/Profile/Templates/FlexView.tsx +++ b/src/Components/Profile/Templates/FlexView.tsx @@ -8,7 +8,7 @@ import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHe import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView' import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' const componentMap = { groupSubheaders: GroupSubHeaderView, diff --git a/src/Components/Profile/Templates/OnepagerForm.tsx b/src/Components/Profile/Templates/OnepagerForm.tsx index 9e4a1783..163cae4e 100644 --- a/src/Components/Profile/Templates/OnepagerForm.tsx +++ b/src/Components/Profile/Templates/OnepagerForm.tsx @@ -4,8 +4,8 @@ import { TextAreaInput } from '#components/Input' import { ContactInfoForm } from '#components/Profile/Subcomponents/ContactInfoForm' import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubheaderForm' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' export const OnepagerForm = ({ item, diff --git a/src/Components/Profile/Templates/OnepagerView.tsx b/src/Components/Profile/Templates/OnepagerView.tsx index b26f0303..32a786ee 100644 --- a/src/Components/Profile/Templates/OnepagerView.tsx +++ b/src/Components/Profile/Templates/OnepagerView.tsx @@ -4,7 +4,7 @@ import { TextView } from '#components/Map' import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView' import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHeaderView' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const OnepagerView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/SimpleView.tsx b/src/Components/Profile/Templates/SimpleView.tsx index 6553cb77..dca6d079 100644 --- a/src/Components/Profile/Templates/SimpleView.tsx +++ b/src/Components/Profile/Templates/SimpleView.tsx @@ -1,6 +1,6 @@ import { TextView } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const SimpleView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index 51df5ec2..d7554b94 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -18,8 +18,8 @@ import { LinkedItemsHeaderView } from '#components/Profile/Subcomponents/LinkedI import { TagView } from '#components/Templates/TagView' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export const TabsView = ({ attestations, diff --git a/src/Components/Profile/UserSettings.tsx b/src/Components/Profile/UserSettings.tsx index 2da3d54d..9f602f63 100644 --- a/src/Components/Profile/UserSettings.tsx +++ b/src/Components/Profile/UserSettings.tsx @@ -8,7 +8,7 @@ import { useAuth } from '#components/Auth' import { TextInput } from '#components/Input' import { MapOverlayPage } from '#components/Templates' -import type { UserItem } from '#src/types/UserItem' +import type { UserItem } from '#types/UserItem' export function UserSettings() { const { user, updateUser, loading /* token */ } = useAuth() diff --git a/src/Components/Profile/itemFunctions.ts b/src/Components/Profile/itemFunctions.ts index 5d4ca6dc..ad11c536 100644 --- a/src/Components/Profile/itemFunctions.ts +++ b/src/Components/Profile/itemFunctions.ts @@ -15,7 +15,7 @@ import { encodeTag } from '#utils/FormatTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' // eslint-disable-next-line promise/avoid-new const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/src/Components/Templates/AttestationForm.tsx b/src/Components/Templates/AttestationForm.tsx index a4d84aea..ce5994ad 100644 --- a/src/Components/Templates/AttestationForm.tsx +++ b/src/Components/Templates/AttestationForm.tsx @@ -8,8 +8,8 @@ import { useItems } from '#components/Map/hooks/useItems' import { EmojiPicker } from './EmojiPicker' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' export const AttestationForm = ({ api }: { api?: ItemsApi }) => { const items = useItems() diff --git a/src/Components/Templates/DateUserInfo.tsx b/src/Components/Templates/DateUserInfo.tsx index 358764bf..4243a9c0 100644 --- a/src/Components/Templates/DateUserInfo.tsx +++ b/src/Components/Templates/DateUserInfo.tsx @@ -5,7 +5,7 @@ import { useState } from 'react' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const DateUserInfo = ({ item }: { item: Item }) => { const [infoExpanded, setInfoExpanded] = useState(false) diff --git a/src/Components/Templates/ItemCard.tsx b/src/Components/Templates/ItemCard.tsx index 1e5938d8..585d18ae 100644 --- a/src/Components/Templates/ItemCard.tsx +++ b/src/Components/Templates/ItemCard.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { DateUserInfo } from './DateUserInfo' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemCard = ({ i, diff --git a/src/Components/Templates/MarketView.tsx b/src/Components/Templates/MarketView.tsx index f2339540..18822755 100644 --- a/src/Components/Templates/MarketView.tsx +++ b/src/Components/Templates/MarketView.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { MapOverlayPage } from './MapOverlayPage' import { TagView } from './TagView' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' function groupAndCount(arr) { const grouped = arr.reduce((acc, obj) => { diff --git a/src/Components/Templates/OverlayItemsIndexPage.tsx b/src/Components/Templates/OverlayItemsIndexPage.tsx index 052ad27c..3388cddc 100644 --- a/src/Components/Templates/OverlayItemsIndexPage.tsx +++ b/src/Components/Templates/OverlayItemsIndexPage.tsx @@ -25,7 +25,7 @@ import { randomColor } from '#utils/RandomColor' import { ItemCard } from './ItemCard' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const OverlayItemsIndexPage = ({ url, diff --git a/src/Components/Templates/TagView.tsx b/src/Components/Templates/TagView.tsx index f103d533..f19c5adc 100644 --- a/src/Components/Templates/TagView.tsx +++ b/src/Components/Templates/TagView.tsx @@ -2,7 +2,7 @@ import { decodeTag } from '#utils/FormatTags' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' export const TagView = ({ tag,