Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow console.log #648

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
065894f
Add a topic field to account for non zero topics
Baleba Dec 5, 2023
b27881f
caniuse-lite from"1.0.30001352"to"1.0.30001566"
Baleba Dec 5, 2023
333dbc6
add text input for topic
Baleba Dec 5, 2023
9f768c6
add topic and bool for to extend topic feed use
Baleba Dec 5, 2023
1cc4c74
add website bool old and new topic use
Baleba Dec 5, 2023
52a0e88
add website and topic
Baleba Dec 5, 2023
645c923
Set feedtype control locally
Baleba Dec 8, 2023
5ec2e6a
Add Array based display of Postes, no data con yet
Baleba Dec 8, 2023
8864e5a
Limited impact on the code remove website bool
Baleba Dec 8, 2023
6fdc68b
Add screen to display posts from the feed when topic is not website.
Baleba Dec 13, 2023
8a39846
Add screen for data input in the case of feed with topic different fr…
Baleba Dec 13, 2023
ce15ece
Add button for managing Posting data.
Baleba Dec 13, 2023
5b0ca5f
Define post type and post array to be used in feed details.
Baleba Dec 13, 2023
30024c3
Add mode POST for upload origin.
Baleba Dec 13, 2023
0841679
change updateFeed to account for POST update.
Baleba Dec 13, 2023
6d9bc55
Create a dropdown list dynamically for identities to choose between.
Baleba Dec 15, 2023
92cd718
Changes related to choosing an Id for feed creation and update.
Baleba Dec 15, 2023
df49445
Update to display posts for a given feed.
Baleba Dec 15, 2023
836aacf
Adding a form to insert json objects as posts.
Baleba Dec 15, 2023
94643a8
Add a button in the upload options to include non website feeds updates.
Baleba Dec 15, 2023
7abdb46
Add some shared data in the Id contexte
Baleba Dec 15, 2023
fb1f82e
Add readFeed function to extract older posts from non website feeds.
Baleba Dec 15, 2023
0099e2a
allow console.log
Baleba Dec 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Array based display of Postes, no data con yet
  • Loading branch information
Baleba committed Dec 8, 2023
commit 5ec2e6a1ba06ffb9fee8bfe4b698971c4dded82d
45 changes: 45 additions & 0 deletions src/pages/feeds/FeedSubpage.tsx
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ import X from 'remixicon-react/CloseLineIcon'
import { DocumentationText } from '../../components/DocumentationText'
import ExpandableListItemActions from '../../components/ExpandableListItemActions'
import ExpandableListItemKey from '../../components/ExpandableListItemKey'
import ExpandableList from '../../components/ExpandableList'
import ExpandableListItem from '../../components/ExpandableListItem'
import { HistoryHeader } from '../../components/HistoryHeader'
import { SwarmButton } from '../../components/SwarmButton'
import { Context as BeeContext } from '../../providers/Bee'
@@ -25,6 +27,34 @@ export function FeedSubpage(): ReactElement {

const identity = identities.find(x => x.uuid === uuid)

const readPostArray: Array<{
Title: String
Type: String
Category: String
Date: String
Amount: String
Provider: String
Place: String
DocRef: String
}> = []

const message = {
Title: 'PS5',
Type: 'Document',
Category: 'Loisir',
Date: '07/12/2023',
Amount: '750€',
Provider: 'Sony',
Place: 'La Defense',
DocRefUrl: '',
}

try {
readPostArray.push(...[message])
} catch (e) {
console.log('Failed to: ', e)
}

useEffect(() => {
if (!identity || !identity.feedHash) {
return
@@ -72,6 +102,21 @@ export function FeedSubpage(): ReactElement {
</DocumentationText>
</Box>
)}
// Posts form
{readPostArray.map((x, i) => (
<ExpandableList key={i} label={`${x.Title} Website`} defaultOpen>
<Box mb={0.5}>
<ExpandableList label={x.Title} level={1}>
<ExpandableListItem label="Post Type" value={x.Type} />
<ExpandableListItem label="Post Date" value={x.Date} />
<ExpandableListItem label="Post Amount" value={x.Amount} />
<ExpandableListItem label="Post Provider" value={x.Provider} />
<ExpandableListItem label="Post Place" value={x.Place} />
/* Add a clickable bzz link to a bill scan here */
</ExpandableList>
</Box>
</ExpandableList>
))}
<ExpandableListItemActions>
<SwarmButton iconType={X} onClick={onClose} cancel>
Close