mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fix types import path
This commit is contained in:
parent
fd3da848ba
commit
79ca17aa3f
@ -2,7 +2,7 @@ import { ContextWrapper } from './ContextWrapper'
|
|||||||
import NavBar from './NavBar'
|
import NavBar from './NavBar'
|
||||||
import { SetAppState } from './SetAppState'
|
import { SetAppState } from './SetAppState'
|
||||||
|
|
||||||
import type { AssetsApi } from '#src/types/AssetsApi'
|
import type { AssetsApi } from '#types/AssetsApi'
|
||||||
|
|
||||||
export function AppShell({
|
export function AppShell({
|
||||||
appName,
|
appName,
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { toast } from 'react-toastify'
|
|||||||
import { useAuth } from '#components/Auth'
|
import { useAuth } from '#components/Auth'
|
||||||
import { useItems } from '#components/Map/hooks/useItems'
|
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 }) {
|
export default function NavBar({ appName, userType }: { appName: string; userType: string }) {
|
||||||
const { isAuthenticated, user, logout } = useAuth()
|
const { isAuthenticated, user, logout } = useAuth()
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useEffect } from 'react'
|
|||||||
|
|
||||||
import { useSetAppState } from './hooks/useAppState'
|
import { useSetAppState } from './hooks/useAppState'
|
||||||
|
|
||||||
import type { AssetsApi } from '#src/types/AssetsApi'
|
import type { AssetsApi } from '#types/AssetsApi'
|
||||||
|
|
||||||
export const SetAppState = ({
|
export const SetAppState = ({
|
||||||
assetsApi,
|
assetsApi,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||||
import { useCallback, useState, createContext, useContext } from 'react'
|
import { useCallback, useState, createContext, useContext } from 'react'
|
||||||
|
|
||||||
import type { AssetsApi } from '#src/types/AssetsApi'
|
import type { AssetsApi } from '#types/AssetsApi'
|
||||||
|
|
||||||
interface AppState {
|
interface AppState {
|
||||||
assetsApi: AssetsApi
|
assetsApi: AssetsApi
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||||
import { useCallback, useState, createContext, useContext } from 'react'
|
import { useCallback, useState, createContext, useContext } from 'react'
|
||||||
|
|
||||||
import type { AssetsApi } from '#src/types/AssetsApi'
|
import type { AssetsApi } from '#types/AssetsApi'
|
||||||
|
|
||||||
type UseAssetManagerResult = ReturnType<typeof useAssetsManager>
|
type UseAssetManagerResult = ReturnType<typeof useAssetsManager>
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { createContext, useState, useContext, useEffect } from 'react'
|
import { createContext, useState, useContext, useEffect } from 'react'
|
||||||
|
|
||||||
import type { UserApi } from '#src/types/UserApi'
|
import type { UserApi } from '#types/UserApi'
|
||||||
import type { UserItem } from '#src/types/UserItem'
|
import type { UserItem } from '#types/UserItem'
|
||||||
|
|
||||||
interface AuthProviderProps {
|
interface AuthProviderProps {
|
||||||
userApi: UserApi
|
userApi: UserApi
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { useItems } from '#components/Map/hooks/useItems'
|
|||||||
|
|
||||||
import { useQuestsOpen, useSetQuestOpen } from './hooks/useQuests'
|
import { useQuestsOpen, useSetQuestOpen } from './hooks/useQuests'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export function Quests() {
|
export function Quests() {
|
||||||
const questsOpen = useQuestsOpen()
|
const questsOpen = useQuestsOpen()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { node, string } from 'prop-types'
|
import { node, string } from 'prop-types'
|
||||||
import { Children, cloneElement, isValidElement, useEffect } from 'react'
|
import { Children, cloneElement, isValidElement, useEffect } from 'react'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const ItemForm = ({
|
export const ItemForm = ({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { node, string } from 'prop-types'
|
import { node, string } from 'prop-types'
|
||||||
import { Children, cloneElement, isValidElement } from 'react'
|
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 }) => {
|
export const ItemView = ({ children, item }: { children?: React.ReactNode; item?: Item }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -28,9 +28,9 @@ import { useAddTag, useAllTagsLoaded, useGetItemTags, useTags } from './hooks/us
|
|||||||
import { ItemFormPopup } from './Subcomponents/ItemFormPopup'
|
import { ItemFormPopup } from './Subcomponents/ItemFormPopup'
|
||||||
import { ItemViewPopup } from './Subcomponents/ItemViewPopup'
|
import { ItemViewPopup } from './Subcomponents/ItemViewPopup'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
import type { Popup } from 'leaflet'
|
import type { Popup } from 'leaflet'
|
||||||
|
|
||||||
export const Layer = ({
|
export const Layer = ({
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { useAuth } from '#components/Auth'
|
|||||||
|
|
||||||
import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './hooks/usePermissions'
|
import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './hooks/usePermissions'
|
||||||
|
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
import type { Permission } from '#src/types/Permission'
|
import type { Permission } from '#types/Permission'
|
||||||
|
|
||||||
export function Permissions({
|
export function Permissions({
|
||||||
data,
|
data,
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import MarkerIconFactory from '#utils/MarkerIconFactory'
|
|||||||
import { LocateControl } from './LocateControl'
|
import { LocateControl } from './LocateControl'
|
||||||
import { SidebarControl } from './SidebarControl'
|
import { SidebarControl } from './SidebarControl'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const SearchControl = () => {
|
export const SearchControl = () => {
|
||||||
const windowDimensions = useWindowDimensions()
|
const windowDimensions = useWindowDimensions()
|
||||||
|
|||||||
@ -19,8 +19,8 @@ import { useAddTag, useTags } from '#components/Map/hooks/useTags'
|
|||||||
import { hashTagRegex } from '#utils/HashTagRegex'
|
import { hashTagRegex } from '#utils/HashTagRegex'
|
||||||
import { randomColor } from '#utils/RandomColor'
|
import { randomColor } from '#utils/RandomColor'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps'
|
import type { ItemFormPopupProps } from '#types/ItemFormPopupProps'
|
||||||
|
|
||||||
export function ItemFormPopup(props: ItemFormPopupProps) {
|
export function ItemFormPopup(props: ItemFormPopupProps) {
|
||||||
const [spinner, setSpinner] = useState(false)
|
const [spinner, setSpinner] = useState(false)
|
||||||
|
|||||||
@ -17,8 +17,8 @@ import { useHasUserPermission } from '#components/Map/hooks/usePermissions'
|
|||||||
import DialogModal from '#components/Templates/DialogModal'
|
import DialogModal from '#components/Templates/DialogModal'
|
||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
|
|
||||||
export function HeaderView({
|
export function HeaderView({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'
|
|||||||
import { useGetItemTags } from '#components/Map/hooks/useTags'
|
import { useGetItemTags } from '#components/Map/hooks/useTags'
|
||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const PopupButton = ({
|
export const PopupButton = ({
|
||||||
url,
|
url,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const PopupCheckboxInput = ({
|
export const PopupCheckboxInput = ({
|
||||||
dataField,
|
dataField,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/prefer-optional-chain */
|
/* eslint-disable @typescript-eslint/prefer-optional-chain */
|
||||||
import { TextInput } from '#components/Input'
|
import { TextInput } from '#components/Input'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
interface StartEndInputProps {
|
interface StartEndInputProps {
|
||||||
item?: Item
|
item?: Item
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { TextAreaInput } from '#components/Input'
|
import { TextAreaInput } from '#components/Input'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const PopupTextAreaInput = ({
|
export const PopupTextAreaInput = ({
|
||||||
dataField,
|
dataField,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { TextInput } from '#components/Input'
|
import { TextInput } from '#components/Input'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const PopupTextInput = ({
|
export const PopupTextInput = ({
|
||||||
dataField,
|
dataField,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/prefer-optional-chain */
|
/* 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 }) => {
|
export const StartEndView = ({ item }: { item?: Item }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -16,8 +16,8 @@ import { getValue } from '#utils/GetValue'
|
|||||||
import { hashTagRegex } from '#utils/HashTagRegex'
|
import { hashTagRegex } from '#utils/HashTagRegex'
|
||||||
import { fixUrls, mailRegex } from '#utils/ReplaceURLs'
|
import { fixUrls, mailRegex } from '#utils/ReplaceURLs'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export const TextView = ({
|
export const TextView = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -20,8 +20,8 @@ import { timeAgo } from '#utils/TimeAgo'
|
|||||||
import { HeaderView } from './ItemPopupComponents/HeaderView'
|
import { HeaderView } from './ItemPopupComponents/HeaderView'
|
||||||
import { TextView } from './ItemPopupComponents/TextView'
|
import { TextView } from './ItemPopupComponents/TextView'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps'
|
import type { ItemFormPopupProps } from '#types/ItemFormPopupProps'
|
||||||
|
|
||||||
export interface ItemViewPopupProps {
|
export interface ItemViewPopupProps {
|
||||||
item: Item
|
item: Item
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { useLocation } from 'react-router-dom'
|
|||||||
import { useAddFilterTag, useFilterTags, useResetFilterTags } from './hooks/useFilter'
|
import { useAddFilterTag, useFilterTags, useResetFilterTags } from './hooks/useFilter'
|
||||||
import { useSetTagData, useSetTagApi, useTags } from './hooks/useTags'
|
import { useSetTagData, useSetTagApi, useTags } from './hooks/useTags'
|
||||||
|
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export function Tags({ data, api }: { data?: Tag[]; api?: ItemsApi<Tag> }) {
|
export function Tags({ data, api }: { data?: Tag[]; api?: ItemsApi<Tag> }) {
|
||||||
const setTagData = useSetTagData()
|
const setTagData = useSetTagData()
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper'
|
|||||||
|
|
||||||
import { UtopiaMapInner } from './UtopiaMapInner'
|
import { UtopiaMapInner } from './UtopiaMapInner'
|
||||||
|
|
||||||
import type { UtopiaMapProps } from '#src/types/UtopiaMapProps'
|
import type { UtopiaMapProps } from '#types/UtopiaMapProps'
|
||||||
import 'react-toastify/dist/ReactToastify.css'
|
import 'react-toastify/dist/ReactToastify.css'
|
||||||
|
|
||||||
function UtopiaMap({
|
function UtopiaMap({
|
||||||
|
|||||||
@ -36,8 +36,8 @@ import { TagsControl } from './Subcomponents/Controls/TagsControl'
|
|||||||
import { TextView } from './Subcomponents/ItemPopupComponents/TextView'
|
import { TextView } from './Subcomponents/ItemPopupComponents/TextView'
|
||||||
import { SelectPosition } from './Subcomponents/SelectPosition'
|
import { SelectPosition } from './Subcomponents/SelectPosition'
|
||||||
|
|
||||||
import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps'
|
import type { ItemFormPopupProps } from '#types/ItemFormPopupProps'
|
||||||
import type { UtopiaMapProps } from '#src/types/UtopiaMapProps'
|
import type { UtopiaMapProps } from '#types/UtopiaMapProps'
|
||||||
import type { Feature, Geometry as GeoJSONGeometry } from 'geojson'
|
import type { Feature, Geometry as GeoJSONGeometry } from 'geojson'
|
||||||
|
|
||||||
export function UtopiaMapInner({
|
export function UtopiaMapInner({
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import { useNavigate } from 'react-router-dom'
|
|||||||
import { useLayers } from './useLayers'
|
import { useLayers } from './useLayers'
|
||||||
import useWindowDimensions from './useWindowDimension'
|
import useWindowDimensions from './useWindowDimension'
|
||||||
|
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
type ActionType =
|
type ActionType =
|
||||||
| { type: 'ADD_TAG'; tag: Tag }
|
| { type: 'ADD_TAG'; tag: Tag }
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import { toast } from 'react-toastify'
|
|||||||
|
|
||||||
import { useAddLayer } from './useLayers'
|
import { useAddLayer } from './useLayers'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
|
|
||||||
type ActionType =
|
type ActionType =
|
||||||
| { type: 'ADD'; item: Item }
|
| { type: 'ADD'; item: Item }
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||||
import { useCallback, useReducer, createContext, useContext } from 'react'
|
import { useCallback, useReducer, createContext, useContext } from 'react'
|
||||||
|
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
|
|
||||||
interface ActionType {
|
interface ActionType {
|
||||||
type: 'ADD LAYER'
|
type: 'ADD LAYER'
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||||
import { useCallback, useReducer, createContext, useContext } from 'react'
|
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'
|
import type { Marker, Popup } from 'leaflet'
|
||||||
|
|
||||||
interface LeafletRef {
|
interface LeafletRef {
|
||||||
|
|||||||
@ -10,11 +10,11 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're
|
|||||||
|
|
||||||
import { useAuth } from '#components/Auth/useAuth'
|
import { useAuth } from '#components/Auth/useAuth'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
import type { Permission } from '#src/types/Permission'
|
import type { Permission } from '#types/Permission'
|
||||||
import type { PermissionAction } from '#src/types/PermissionAction'
|
import type { PermissionAction } from '#types/PermissionAction'
|
||||||
|
|
||||||
type ActionType = { type: 'ADD'; permission: Permission } | { type: 'REMOVE'; id: string }
|
type ActionType = { type: 'ADD'; permission: Permission } | { type: 'REMOVE'; id: string }
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,9 @@ import { toast } from 'react-toastify'
|
|||||||
import { useUpdateItem } from './useItems'
|
import { useUpdateItem } from './useItems'
|
||||||
import { useHasUserPermission } from './usePermissions'
|
import { useHasUserPermission } from './usePermissions'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps'
|
import type { ItemFormPopupProps } from '#types/ItemFormPopupProps'
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
import type { Point } from 'geojson'
|
import type { Point } from 'geojson'
|
||||||
import type { LatLng } from 'leaflet'
|
import type { LatLng } from 'leaflet'
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,9 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're
|
|||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
import { hashTagRegex } from '#utils/HashTagRegex'
|
import { hashTagRegex } from '#utils/HashTagRegex'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
type ActionType = { type: 'ADD'; tag: Tag } | { type: 'REMOVE'; id: string }
|
type ActionType = { type: 'ADD'; tag: Tag } | { type: 'REMOVE'; id: string }
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@ import { OnepagerForm } from './Templates/OnepagerForm'
|
|||||||
import { SimpleForm } from './Templates/SimpleForm'
|
import { SimpleForm } from './Templates/SimpleForm'
|
||||||
import { TabsForm } from './Templates/TabsForm'
|
import { TabsForm } from './Templates/TabsForm'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export function ProfileForm() {
|
export function ProfileForm() {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
|
|||||||
@ -29,9 +29,9 @@ import { OnepagerView } from './Templates/OnepagerView'
|
|||||||
import { SimpleView } from './Templates/SimpleView'
|
import { SimpleView } from './Templates/SimpleView'
|
||||||
import { TabsView } from './Templates/TabsView'
|
import { TabsView } from './Templates/TabsView'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi<any> }) {
|
export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi<any> }) {
|
||||||
const [item, setItem] = useState<Item>()
|
const [item, setItem] = useState<Item>()
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { HeaderView } from '#components/Map/Subcomponents/ItemPopupComponents/He
|
|||||||
import DialogModal from '#components/Templates/DialogModal'
|
import DialogModal from '#components/Templates/DialogModal'
|
||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export function ActionButton({
|
export function ActionButton({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
import { TextInput } from '#components/Input'
|
import { TextInput } from '#components/Input'
|
||||||
|
|
||||||
import type { FormState } from '#src/types/FormState'
|
import type { FormState } from '#types/FormState'
|
||||||
|
|
||||||
export const ContactInfoForm = ({
|
export const ContactInfoForm = ({
|
||||||
state,
|
state,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { Link } from 'react-router-dom'
|
|||||||
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
||||||
import { useItems } from '#components/Map/hooks/useItems'
|
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 }) => {
|
export const ContactInfoView = ({ item, heading }: { item: Item; heading: string }) => {
|
||||||
const appState = useAppState()
|
const appState = useAppState()
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import 'react-photo-album/rows.css'
|
|||||||
|
|
||||||
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
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 }) => {
|
export const GalleryView = ({ item }: { item: Item }) => {
|
||||||
const [index, setIndex] = useState(-1)
|
const [index, setIndex] = useState(-1)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import SocialShareBar from './SocialShareBar'
|
import SocialShareBar from './SocialShareBar'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const GroupSubHeaderView = ({
|
export const GroupSubHeaderView = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import { useEffect } from 'react'
|
|||||||
|
|
||||||
import ComboBoxInput from '#components/Input/ComboBoxInput'
|
import ComboBoxInput from '#components/Input/ComboBoxInput'
|
||||||
|
|
||||||
import type { FormState } from '#src/types/FormState'
|
import type { FormState } from '#types/FormState'
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
interface groupType {
|
interface groupType {
|
||||||
groupTypes_id: {
|
groupTypes_id: {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { useEffect } from 'react'
|
|||||||
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export function LinkedItemsHeaderView({
|
export function LinkedItemsHeaderView({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||||
import { useHasUserPermission } from '#components/Map/hooks/usePermissions'
|
import { useHasUserPermission } from '#components/Map/hooks/usePermissions'
|
||||||
|
|
||||||
import type { LayerProps } from '#src/types/LayerProps'
|
import type { LayerProps } from '#types/LayerProps'
|
||||||
|
|
||||||
export function PlusButton({
|
export function PlusButton({
|
||||||
layer,
|
layer,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
import { PopupStartEndInput } from '#components/Map'
|
import { PopupStartEndInput } from '#components/Map'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const ProfileStartEndForm = ({
|
export const ProfileStartEndForm = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { StartEndView } from '#components/Map'
|
import { StartEndView } from '#components/Map'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const ProfileStartEndView = ({ item }: { item: Item }) => {
|
export const ProfileStartEndView = ({ item }: { item: Item }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { getValue } from '#utils/GetValue'
|
|||||||
|
|
||||||
import { MarkdownHint } from './MarkdownHint'
|
import { MarkdownHint } from './MarkdownHint'
|
||||||
|
|
||||||
import type { FormState } from '#src/types/FormState'
|
import type { FormState } from '#types/FormState'
|
||||||
|
|
||||||
export const ProfileTextForm = ({
|
export const ProfileTextForm = ({
|
||||||
state,
|
state,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { TextView } from '#components/Map'
|
import { TextView } from '#components/Map'
|
||||||
import { getValue } from '#utils/GetValue'
|
import { getValue } from '#utils/GetValue'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const ProfileTextView = ({
|
export const ProfileTextView = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { useTags } from '#components/Map/hooks/useTags'
|
|||||||
import { decodeTag, encodeTag } from '#utils/FormatTags'
|
import { decodeTag, encodeTag } from '#utils/FormatTags'
|
||||||
import { randomColor } from '#utils/RandomColor'
|
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
|
// eslint-disable-next-line react/prop-types
|
||||||
export const TagsWidget = ({ placeholder, containerStyle, defaultTags, onUpdate }) => {
|
export const TagsWidget = ({ placeholder, containerStyle, defaultTags, onUpdate }) => {
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubhe
|
|||||||
import { ProfileStartEndForm } from '#components/Profile/Subcomponents/ProfileStartEndForm'
|
import { ProfileStartEndForm } from '#components/Profile/Subcomponents/ProfileStartEndForm'
|
||||||
import { ProfileTextForm } from '#components/Profile/Subcomponents/ProfileTextForm'
|
import { ProfileTextForm } from '#components/Profile/Subcomponents/ProfileTextForm'
|
||||||
|
|
||||||
import type { FormState } from '#src/types/FormState'
|
import type { FormState } from '#types/FormState'
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
const componentMap = {
|
const componentMap = {
|
||||||
groupSubheaders: GroupSubheaderForm,
|
groupSubheaders: GroupSubheaderForm,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHe
|
|||||||
import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView'
|
import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView'
|
||||||
import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView'
|
import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
const componentMap = {
|
const componentMap = {
|
||||||
groupSubheaders: GroupSubHeaderView,
|
groupSubheaders: GroupSubHeaderView,
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { TextAreaInput } from '#components/Input'
|
|||||||
import { ContactInfoForm } from '#components/Profile/Subcomponents/ContactInfoForm'
|
import { ContactInfoForm } from '#components/Profile/Subcomponents/ContactInfoForm'
|
||||||
import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubheaderForm'
|
import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubheaderForm'
|
||||||
|
|
||||||
import type { FormState } from '#src/types/FormState'
|
import type { FormState } from '#types/FormState'
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const OnepagerForm = ({
|
export const OnepagerForm = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { TextView } from '#components/Map'
|
|||||||
import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView'
|
import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView'
|
||||||
import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHeaderView'
|
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 }) => {
|
export const OnepagerView = ({ item }: { item: Item }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { TextView } from '#components/Map'
|
import { TextView } from '#components/Map'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const SimpleView = ({ item }: { item: Item }) => {
|
export const SimpleView = ({ item }: { item: Item }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -18,8 +18,8 @@ import { LinkedItemsHeaderView } from '#components/Profile/Subcomponents/LinkedI
|
|||||||
import { TagView } from '#components/Templates/TagView'
|
import { TagView } from '#components/Templates/TagView'
|
||||||
import { timeAgo } from '#utils/TimeAgo'
|
import { timeAgo } from '#utils/TimeAgo'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export const TabsView = ({
|
export const TabsView = ({
|
||||||
attestations,
|
attestations,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { useAuth } from '#components/Auth'
|
|||||||
import { TextInput } from '#components/Input'
|
import { TextInput } from '#components/Input'
|
||||||
import { MapOverlayPage } from '#components/Templates'
|
import { MapOverlayPage } from '#components/Templates'
|
||||||
|
|
||||||
import type { UserItem } from '#src/types/UserItem'
|
import type { UserItem } from '#types/UserItem'
|
||||||
|
|
||||||
export function UserSettings() {
|
export function UserSettings() {
|
||||||
const { user, updateUser, loading /* token */ } = useAuth()
|
const { user, updateUser, loading /* token */ } = useAuth()
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { encodeTag } from '#utils/FormatTags'
|
|||||||
import { hashTagRegex } from '#utils/HashTagRegex'
|
import { hashTagRegex } from '#utils/HashTagRegex'
|
||||||
import { randomColor } from '#utils/RandomColor'
|
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
|
// eslint-disable-next-line promise/avoid-new
|
||||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import { useItems } from '#components/Map/hooks/useItems'
|
|||||||
import { EmojiPicker } from './EmojiPicker'
|
import { EmojiPicker } from './EmojiPicker'
|
||||||
import { MapOverlayPage } from './MapOverlayPage'
|
import { MapOverlayPage } from './MapOverlayPage'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
import type { ItemsApi } from '#src/types/ItemsApi'
|
import type { ItemsApi } from '#types/ItemsApi'
|
||||||
|
|
||||||
export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
export const AttestationForm = ({ api }: { api?: ItemsApi<unknown> }) => {
|
||||||
const items = useItems()
|
const items = useItems()
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { useState } from 'react'
|
|||||||
|
|
||||||
import { timeAgo } from '#utils/TimeAgo'
|
import { timeAgo } from '#utils/TimeAgo'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const DateUserInfo = ({ item }: { item: Item }) => {
|
export const DateUserInfo = ({ item }: { item: Item }) => {
|
||||||
const [infoExpanded, setInfoExpanded] = useState<boolean>(false)
|
const [infoExpanded, setInfoExpanded] = useState<boolean>(false)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue'
|
|||||||
|
|
||||||
import { DateUserInfo } from './DateUserInfo'
|
import { DateUserInfo } from './DateUserInfo'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const ItemCard = ({
|
export const ItemCard = ({
|
||||||
i,
|
i,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue'
|
|||||||
import { MapOverlayPage } from './MapOverlayPage'
|
import { MapOverlayPage } from './MapOverlayPage'
|
||||||
import { TagView } from './TagView'
|
import { TagView } from './TagView'
|
||||||
|
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
function groupAndCount(arr) {
|
function groupAndCount(arr) {
|
||||||
const grouped = arr.reduce((acc, obj) => {
|
const grouped = arr.reduce((acc, obj) => {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import { randomColor } from '#utils/RandomColor'
|
|||||||
import { ItemCard } from './ItemCard'
|
import { ItemCard } from './ItemCard'
|
||||||
import { MapOverlayPage } from './MapOverlayPage'
|
import { MapOverlayPage } from './MapOverlayPage'
|
||||||
|
|
||||||
import type { Item } from '#src/types/Item'
|
import type { Item } from '#types/Item'
|
||||||
|
|
||||||
export const OverlayItemsIndexPage = ({
|
export const OverlayItemsIndexPage = ({
|
||||||
url,
|
url,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { decodeTag } from '#utils/FormatTags'
|
import { decodeTag } from '#utils/FormatTags'
|
||||||
|
|
||||||
import type { Tag } from '#src/types/Tag'
|
import type { Tag } from '#types/Tag'
|
||||||
|
|
||||||
export const TagView = ({
|
export const TagView = ({
|
||||||
tag,
|
tag,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user