diff --git a/src/Components/Templates/DateUserInfo.tsx b/src/Components/Templates/DateUserInfo.tsx index 4243a9c0..fcc4dacc 100644 --- a/src/Components/Templates/DateUserInfo.tsx +++ b/src/Components/Templates/DateUserInfo.tsx @@ -1,6 +1,3 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -/* eslint-disable @typescript-eslint/prefer-optional-chain */ import { useState } from 'react' import { timeAgo } from '#utils/TimeAgo' @@ -18,7 +15,8 @@ export const DateUserInfo = ({ item }: { item: Item }) => {

setInfoExpanded(false)} - >{`${item.date_updated && item.date_updated !== item.date_created ? 'updated' : 'posted'} ${item && item.user_created && item.user_created.first_name ? `by ${item.user_created.first_name}` : ''} ${item.date_updated ? timeAgo(item.date_updated) : timeAgo(item.date_created!)}`}

+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + >{`${item.date_updated && item.date_updated !== item.date_created ? 'updated' : 'posted'} ${item.user_created?.first_name ? `by ${item.user_created.first_name}` : ''} ${item.date_updated ? timeAgo(item.date_updated) : timeAgo(item.date_created!)}`}

) : (

selectEmoji(emoji)} - className={`tw-cursor-pointer tw-text-2xl tw-p-2 hover:tw-bg-base-200 tw-rounded-md ${emoji === selectedEmoji && 'tw-bg-base-300'}`} + className={`tw-cursor-pointer tw-text-2xl tw-p-2 hover:tw-bg-base-200 tw-rounded-md ${emoji === selectedEmoji ? 'tw-bg-base-300' : ''}`} > {emoji} @@ -121,7 +120,7 @@ export const EmojiPicker = ({ {shapes.map((shape) => (

selectShape(shape)} >
@@ -133,7 +132,7 @@ export const EmojiPicker = ({ {colors.map((color) => (
selectColor(color)} >
diff --git a/src/Components/Templates/ItemCard.tsx b/src/Components/Templates/ItemCard.tsx index b876f670..f173124f 100644 --- a/src/Components/Templates/ItemCard.tsx +++ b/src/Components/Templates/ItemCard.tsx @@ -1,8 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { useNavigate } from 'react-router-dom' import { StartEndView, TextView } from '#components/Map' @@ -22,7 +17,7 @@ export const ItemCard = ({ i: Item loading: boolean url: string - deleteCallback: any + deleteCallback: (item: Item) => void }) => { const navigate = useNavigate() const windowDimensions = useWindowDimensions() @@ -34,8 +29,8 @@ export const ItemCard = ({ // We could have an onClick callback instead const params = new URLSearchParams(window.location.search) if (windowDimensions.width < 786 && i.position) - navigate('/' + i.id + `${params ? `?${params}` : ''}`) - else navigate(url + i.id + `${params ? `?${params}` : ''}`) + navigate('/' + i.id + `${params.size > 0 ? `?${params.toString()}` : ''}`) + else navigate(url + i.id + `${params.size > 0 ? `?${params.toString()}` : ''}`) }} > +
{children}