move store in local storage

This commit is contained in:
Thomas Ruoff
2021-03-10 23:53:35 +01:00
parent eaba68a779
commit 1633fad10b
13 changed files with 5414 additions and 193 deletions

View File

@@ -1,19 +1,19 @@
import React from 'react'
import { ILatest } from '../interfaces/ILatest'
import { IStoreItem } from '../interfaces/IStoreItem'
export default function LatestList({
latest,
storeData,
onSelect,
onRemove,
}: {
latest: ILatest[]
onSelect: (l: ILatest) => void
onRemove: (l: ILatest) => void
storeData: IStoreItem[]
onSelect: (l: IStoreItem) => void
onRemove: (l: IStoreItem) => void
}) {
if (!latest || !latest.length) {
if (!storeData || !storeData.length) {
return null
}
const latestElements = latest.map((item) => {
const latestElements = storeData.map((item) => {
const created = new Date(item.created)
const subject = item.subject
const hrefId = `#item-${item.id}`