Removed orphane code and root package-lock

This commit is contained in:
Dmitriy Shishkov 2023-08-12 12:28:38 +03:00
parent 6241fafbc6
commit 79ff0a3813
Signed by: dm1sh
GPG Key ID: 027994B0AA357688
4 changed files with 6 additions and 14 deletions

View File

@ -13,7 +13,7 @@ const UserCategoriesNames: Record<UserCategory, string> = {
const userCategoriesInfos: Record<UserCategory, (ann: Announcement) => string> = {
givingOut: (ann: Announcement) => (
`Годен до ${new Date(ann.bestBy).toLocaleDateString('ru')}`
`Годен до ${ann.bestBy}`
),
needDispose: (ann: Announcement) => (
`Было заинтересно ${ann.bookedBy} чел.`

View File

@ -38,7 +38,7 @@ const View = ({
<span>{categoryNames[category]}</span>
<span className='m-2'>&#x2022;</span>{/* dot */}
<span>Годен до {new Date(bestBy).toLocaleString('ru-RU')}</span>
<span>Годен до {bestBy}</span>
<p className='mb-0'>{description}</p>
@ -84,10 +84,10 @@ function Control({
<>
<p>Забронировали {bookedBy + (bookButton.disabled ? 1 : 0)} чел.</p>
{(myId === userId) ? (
<>
<Button variant='success' onClick={showDispose}>Утилизировать</Button>
<Button variant='success' onClick={() => void handleRemove(id)} {...removeButton} />
</>
<div className='m-0'>
<Button className='m-1' variant='success' onClick={showDispose}>Утилизировать</Button>
<Button className='m-1' variant='success' onClick={() => void handleRemove(id)} {...removeButton} />
</div>
) : (
<Button variant='success' onClick={() => void handleBook(id)} {...bookButton} />
)}

View File

@ -7,8 +7,6 @@ import { Category } from '../../assets/category'
import { composeTrashboxURL, processTrashbox } from '../../api/trashbox'
const useTrashboxes = (position: LatLng, category: Category): UseFetchReturn<Trashbox[]> => (
// TODO: Remove once available
// eslint-disable-next-line react-hooks/rules-of-hooks
useFetch(
composeTrashboxURL(position, category),
'GET',

6
package-lock.json generated
View File

@ -1,6 +0,0 @@
{
"name": "porridger_tmp",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}