From 6d3f2bf38cae7869bf8ad5f25a08ca0d99e09f30 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 2 Nov 2024 23:26:14 +0100 Subject: [PATCH] remove new lines --- src/Components/AppShell/hooks/useAssets.tsx | 1 - src/Components/Auth/useAuth.tsx | 6 ------ src/Components/Input/ComboBoxInput.tsx | 1 - src/Components/Input/TextAreaInput.tsx | 1 - .../ItemPopupComponents/PopupStartEndInput.tsx | 2 -- src/Components/Map/hooks/useFilter.tsx | 9 --------- src/Components/Map/hooks/useItems.tsx | 6 ------ src/Components/Map/hooks/useLayers.tsx | 1 - src/Components/Map/hooks/useLeafletRefs.tsx | 2 -- src/Components/Map/hooks/usePermissions.tsx | 4 ---- 10 files changed, 33 deletions(-) diff --git a/src/Components/AppShell/hooks/useAssets.tsx b/src/Components/AppShell/hooks/useAssets.tsx index d301df79..c3e4465e 100644 --- a/src/Components/AppShell/hooks/useAssets.tsx +++ b/src/Components/AppShell/hooks/useAssets.tsx @@ -12,7 +12,6 @@ const AssetContext = createContext({ function useAssetsManager(): { api: AssetsApi - setAssetsApi: (api: AssetsApi) => void } { const [api, setApi] = useState({} as AssetsApi) diff --git a/src/Components/Auth/useAuth.tsx b/src/Components/Auth/useAuth.tsx index f70a6485..f5a1cfeb 100644 --- a/src/Components/Auth/useAuth.tsx +++ b/src/Components/Auth/useAuth.tsx @@ -16,18 +16,13 @@ type AuthCredentials = { type AuthContextProps = { isAuthenticated: boolean user: UserItem | null - login: (credentials: AuthCredentials) => Promise - register: (credentials: AuthCredentials, userName: string) => Promise loading: boolean logout: () => Promise - updateUser: (user: UserItem) => any token: string | null - requestPasswordReset: (email: string, reset_url: string) => Promise - passwordReset: (token: string, new_password: string) => Promise } @@ -111,7 +106,6 @@ export const AuthProvider = ({ userApi, children }: AuthProviderProps) => { const updateUser = async (user: UserItem) => { setLoading(true) - const { id, ...userRest } = user try { diff --git a/src/Components/Input/ComboBoxInput.tsx b/src/Components/Input/ComboBoxInput.tsx index e81948e0..91b49d88 100644 --- a/src/Components/Input/ComboBoxInput.tsx +++ b/src/Components/Input/ComboBoxInput.tsx @@ -5,7 +5,6 @@ interface ComboBoxProps { id?: string options: { value: string; label: string }[] value: string - onValueChange: (newValue: string) => void } diff --git a/src/Components/Input/TextAreaInput.tsx b/src/Components/Input/TextAreaInput.tsx index 8106ca7e..fc66f731 100644 --- a/src/Components/Input/TextAreaInput.tsx +++ b/src/Components/Input/TextAreaInput.tsx @@ -11,7 +11,6 @@ type TextAreaProps = { inputStyle?: string defaultValue: string placeholder?: string - updateFormValue?: (value: string) => void } diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx index b83de691..4a728ee0 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx @@ -5,9 +5,7 @@ import { Item } from '../../../../types' type StartEndInputProps = { item?: Item showLabels?: boolean - updateStartValue?: (value: string) => void - updateEndValue?: (value: string) => void } diff --git a/src/Components/Map/hooks/useFilter.tsx b/src/Components/Map/hooks/useFilter.tsx index 4d6a1d39..6d1eb765 100644 --- a/src/Components/Map/hooks/useFilter.tsx +++ b/src/Components/Map/hooks/useFilter.tsx @@ -32,7 +32,6 @@ const FilterContext = createContext({ toggleVisibleLayer: () => {}, resetVisibleLayers: () => {}, isLayerVisible: () => true, - addVisibleGroupType: () => {}, toggleVisibleGroupType: () => {}, isGroupTypeVisible: () => true, @@ -45,23 +44,15 @@ function useFilterManager(initialTags: Tag[]): { visibleGroupTypes: string[] addFilterTag: (tag: Tag) => void - removeFilterTag: (name: string) => void resetFilterTags: () => void - setSearchPhrase: (phrase: string) => void - addVisibleLayer: (layer: LayerProps) => void - toggleVisibleLayer: (layer: LayerProps) => void resetVisibleLayers: () => void - isLayerVisible: (layer: LayerProps) => boolean - addVisibleGroupType: (groupType: string) => void - toggleVisibleGroupType: (groupType: string) => void - isGroupTypeVisible: (groupType: string) => boolean } { const [filterTags, dispatchTags] = useReducer((state: Tag[], action: ActionType) => { diff --git a/src/Components/Map/hooks/useItems.tsx b/src/Components/Map/hooks/useItems.tsx index bba55845..0b75cf86 100644 --- a/src/Components/Map/hooks/useItems.tsx +++ b/src/Components/Map/hooks/useItems.tsx @@ -25,17 +25,11 @@ const ItemContext = createContext({ function useItemsManager(initialItems: Item[]): { items: Item[] - addItem: (item: Item) => void - updateItem: (item: Item) => void - removeItem: (item: Item) => void - resetItems: (layer: LayerProps) => void - setItemsApi: (layer: LayerProps) => void - setItemsData: (layer: LayerProps) => void allItemsLoaded: boolean } { diff --git a/src/Components/Map/hooks/useLayers.tsx b/src/Components/Map/hooks/useLayers.tsx index ac84113d..d37197a7 100644 --- a/src/Components/Map/hooks/useLayers.tsx +++ b/src/Components/Map/hooks/useLayers.tsx @@ -13,7 +13,6 @@ const LayerContext = createContext({ function useLayerManager(initialLayers: LayerProps[]): { layers: LayerProps[] - addLayer: (layer: LayerProps) => void } { const [layers, dispatch] = useReducer((state: LayerProps[], action: ActionType) => { diff --git a/src/Components/Map/hooks/useLeafletRefs.tsx b/src/Components/Map/hooks/useLeafletRefs.tsx index 73f41d9f..73c7a4a8 100644 --- a/src/Components/Map/hooks/useLeafletRefs.tsx +++ b/src/Components/Map/hooks/useLeafletRefs.tsx @@ -23,9 +23,7 @@ const LeafletRefsContext = createContext({ function useLeafletRefsManager(initialLeafletRefs: {}): { leafletRefs: Record - addMarker: (item: Item, marker: Marker) => void - addPopup: (item: Item, popup: Popup) => void } { const [leafletRefs, dispatch] = useReducer( diff --git a/src/Components/Map/hooks/usePermissions.tsx b/src/Components/Map/hooks/usePermissions.tsx index 6b0ee635..e9cbbe7c 100644 --- a/src/Components/Map/hooks/usePermissions.tsx +++ b/src/Components/Map/hooks/usePermissions.tsx @@ -17,13 +17,9 @@ const PermissionContext = createContext({ function usePermissionsManager(initialPermissions: Permission[]): { permissions: Permission[] - setPermissionApi: (api: ItemsApi) => void - setPermissionData: (data: Permission[]) => void - setAdminRole: (adminRole: string) => void - hasUserPermission: ( collectionName: string, action: PermissionAction,