mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
remove new lines
This commit is contained in:
parent
2f77dde3da
commit
6d3f2bf38c
@ -12,7 +12,6 @@ const AssetContext = createContext<UseAssetManagerResult>({
|
||||
|
||||
function useAssetsManager(): {
|
||||
api: AssetsApi
|
||||
|
||||
setAssetsApi: (api: AssetsApi) => void
|
||||
} {
|
||||
const [api, setApi] = useState<AssetsApi>({} as AssetsApi)
|
||||
|
||||
@ -16,18 +16,13 @@ type AuthCredentials = {
|
||||
type AuthContextProps = {
|
||||
isAuthenticated: boolean
|
||||
user: UserItem | null
|
||||
|
||||
login: (credentials: AuthCredentials) => Promise<UserItem | undefined>
|
||||
|
||||
register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>
|
||||
loading: boolean
|
||||
logout: () => Promise<any>
|
||||
|
||||
updateUser: (user: UserItem) => any
|
||||
token: string | null
|
||||
|
||||
requestPasswordReset: (email: string, reset_url: string) => Promise<any>
|
||||
|
||||
passwordReset: (token: string, new_password: string) => Promise<any>
|
||||
}
|
||||
|
||||
@ -111,7 +106,6 @@ export const AuthProvider = ({ userApi, children }: AuthProviderProps) => {
|
||||
|
||||
const updateUser = async (user: UserItem) => {
|
||||
setLoading(true)
|
||||
|
||||
const { id, ...userRest } = user
|
||||
|
||||
try {
|
||||
|
||||
@ -5,7 +5,6 @@ interface ComboBoxProps {
|
||||
id?: string
|
||||
options: { value: string; label: string }[]
|
||||
value: string
|
||||
|
||||
onValueChange: (newValue: string) => void
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ type TextAreaProps = {
|
||||
inputStyle?: string
|
||||
defaultValue: string
|
||||
placeholder?: string
|
||||
|
||||
updateFormValue?: (value: string) => void
|
||||
}
|
||||
|
||||
|
||||
@ -5,9 +5,7 @@ import { Item } from '../../../../types'
|
||||
type StartEndInputProps = {
|
||||
item?: Item
|
||||
showLabels?: boolean
|
||||
|
||||
updateStartValue?: (value: string) => void
|
||||
|
||||
updateEndValue?: (value: string) => void
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ const FilterContext = createContext<UseFilterManagerResult>({
|
||||
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) => {
|
||||
|
||||
@ -25,17 +25,11 @@ const ItemContext = createContext<UseItemManagerResult>({
|
||||
|
||||
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
|
||||
} {
|
||||
|
||||
@ -13,7 +13,6 @@ const LayerContext = createContext<UseItemManagerResult>({
|
||||
|
||||
function useLayerManager(initialLayers: LayerProps[]): {
|
||||
layers: LayerProps[]
|
||||
|
||||
addLayer: (layer: LayerProps) => void
|
||||
} {
|
||||
const [layers, dispatch] = useReducer((state: LayerProps[], action: ActionType) => {
|
||||
|
||||
@ -23,9 +23,7 @@ const LeafletRefsContext = createContext<UseLeafletRefsManagerResult>({
|
||||
|
||||
function useLeafletRefsManager(initialLeafletRefs: {}): {
|
||||
leafletRefs: Record<string, LeafletRef>
|
||||
|
||||
addMarker: (item: Item, marker: Marker) => void
|
||||
|
||||
addPopup: (item: Item, popup: Popup) => void
|
||||
} {
|
||||
const [leafletRefs, dispatch] = useReducer(
|
||||
|
||||
@ -17,13 +17,9 @@ const PermissionContext = createContext<UsePermissionManagerResult>({
|
||||
|
||||
function usePermissionsManager(initialPermissions: Permission[]): {
|
||||
permissions: Permission[]
|
||||
|
||||
setPermissionApi: (api: ItemsApi<any>) => void
|
||||
|
||||
setPermissionData: (data: Permission[]) => void
|
||||
|
||||
setAdminRole: (adminRole: string) => void
|
||||
|
||||
hasUserPermission: (
|
||||
collectionName: string,
|
||||
action: PermissionAction,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user