Removed orphane code and root package-lock
This commit is contained in:
parent
6241fafbc6
commit
79ff0a3813
@ -13,7 +13,7 @@ const UserCategoriesNames: Record<UserCategory, string> = {
|
|||||||
|
|
||||||
const userCategoriesInfos: Record<UserCategory, (ann: Announcement) => string> = {
|
const userCategoriesInfos: Record<UserCategory, (ann: Announcement) => string> = {
|
||||||
givingOut: (ann: Announcement) => (
|
givingOut: (ann: Announcement) => (
|
||||||
`Годен до ${new Date(ann.bestBy).toLocaleDateString('ru')}`
|
`Годен до ${ann.bestBy}`
|
||||||
),
|
),
|
||||||
needDispose: (ann: Announcement) => (
|
needDispose: (ann: Announcement) => (
|
||||||
`Было заинтересно ${ann.bookedBy} чел.`
|
`Было заинтересно ${ann.bookedBy} чел.`
|
||||||
|
@ -38,7 +38,7 @@ const View = ({
|
|||||||
|
|
||||||
<span>{categoryNames[category]}</span>
|
<span>{categoryNames[category]}</span>
|
||||||
<span className='m-2'>•</span>{/* dot */}
|
<span className='m-2'>•</span>{/* dot */}
|
||||||
<span>Годен до {new Date(bestBy).toLocaleString('ru-RU')}</span>
|
<span>Годен до {bestBy}</span>
|
||||||
|
|
||||||
<p className='mb-0'>{description}</p>
|
<p className='mb-0'>{description}</p>
|
||||||
|
|
||||||
@ -84,10 +84,10 @@ function Control({
|
|||||||
<>
|
<>
|
||||||
<p>Забронировали {bookedBy + (bookButton.disabled ? 1 : 0)} чел.</p>
|
<p>Забронировали {bookedBy + (bookButton.disabled ? 1 : 0)} чел.</p>
|
||||||
{(myId === userId) ? (
|
{(myId === userId) ? (
|
||||||
<>
|
<div className='m-0'>
|
||||||
<Button variant='success' onClick={showDispose}>Утилизировать</Button>
|
<Button className='m-1' variant='success' onClick={showDispose}>Утилизировать</Button>
|
||||||
<Button variant='success' onClick={() => void handleRemove(id)} {...removeButton} />
|
<Button className='m-1' variant='success' onClick={() => void handleRemove(id)} {...removeButton} />
|
||||||
</>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Button variant='success' onClick={() => void handleBook(id)} {...bookButton} />
|
<Button variant='success' onClick={() => void handleBook(id)} {...bookButton} />
|
||||||
)}
|
)}
|
||||||
|
@ -7,8 +7,6 @@ import { Category } from '../../assets/category'
|
|||||||
import { composeTrashboxURL, processTrashbox } from '../../api/trashbox'
|
import { composeTrashboxURL, processTrashbox } from '../../api/trashbox'
|
||||||
|
|
||||||
const useTrashboxes = (position: LatLng, category: Category): UseFetchReturn<Trashbox[]> => (
|
const useTrashboxes = (position: LatLng, category: Category): UseFetchReturn<Trashbox[]> => (
|
||||||
// TODO: Remove once available
|
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
||||||
useFetch(
|
useFetch(
|
||||||
composeTrashboxURL(position, category),
|
composeTrashboxURL(position, category),
|
||||||
'GET',
|
'GET',
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "porridger_tmp",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user