Skip to content

Commit

Permalink
update to DUCE/DUCEREF tables
Browse files Browse the repository at this point in the history
  • Loading branch information
dekanbro committed Apr 10, 2024
1 parent 952af06 commit 93a2e36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/hooks/UseRecords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const fetchRecords = async ({
}


if (hash && recordType === "DIN") {
if (hash && recordType === "DUCEREF") {
console.log("hash recordtype", hash, recordType);
const filteredData = data.items.filter(
(item) => {
Expand All @@ -95,7 +95,7 @@ const fetchRecords = async ({
);
console.log("filteredData DIN", filteredData);
return filteredData;
} else if (hash && recordType === "DINComment") {
} else if (hash && recordType === "DUCE") {

const filteredData = data.items.filter(
(item) => {
Expand All @@ -104,7 +104,7 @@ const fetchRecords = async ({
);
console.log("filteredData", filteredData);
return filteredData;
} else if (parentHash && recordType === "DINComment") {
} else if (parentHash && recordType === "DUCE") {

const filteredData = data.items.filter(
(item) => {
Expand All @@ -113,11 +113,11 @@ const fetchRecords = async ({
);
console.log("filteredData", filteredData);
return filteredData;
} else if (recordType === "DINComment" || recordType === "DIN") {
} else if (recordType === "DUCE") {

return data.items.filter(
(item) => {
return (item as Record)?.parsedContent.parentId === "0"
return (item as Record)?.parsedContent.description !== ""
}
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ function Blog() {
const { records: dinRecords } = useRecords({
daoId: daoId,
chainId: chainId as ValidNetwork,
recordType: "DIN",
recordType: "DUCEREF",
});

const { records: commentRecords } = useRecords({
daoId: daoId,
chainId: chainId as ValidNetwork,
recordType: "DINComment",
recordType: "DUCE",
});

console.log(dinRecords);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/BlogDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ function BlogDetail() {
let { records } = useRecords({
daoId: daoId,
chainId: chainId as ValidNetwork,
recordType: "DIN",
recordType: "DUCEREF",
hash: contentId
});

const { records: comment } = useRecords({
daoId: daoId,
chainId: chainId as ValidNetwork,
recordType: "DINComment",
recordType: "DUCE",
hash: contentId
});

Expand Down

0 comments on commit 93a2e36

Please sign in to comment.