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

Fix notification issues #304

Merged
merged 7 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
2 changes: 0 additions & 2 deletions apps/old/widget/app/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ if (!config) {
}
}

console.log("config", config);

if (!config) {
return (
<p>
Expand Down
7 changes: 2 additions & 5 deletions apps/old/widget/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Left = styled.div`
const Right = styled.div`
display: flex;
align-items: center;
gap: 16px;
gap: 8px;

@media screen and (max-width: 768px) {
display: none;
Expand Down Expand Up @@ -218,13 +218,10 @@ const MobileContent = styled.div`
`;

const getNotificationCount = () => {
const notificationFeedSrc = "${alias_mob}/widget/NotificationFeed";

const lastBlockHeight = Storage.get("lastBlockHeight", notificationFeedSrc);
const lastBlockHeight = Storage.get("lastBlockHeight");
if (lastBlockHeight === null) {
return "";
}

const notifications = Social.index("notify", context.accountId, {
order: "asc",
from: (lastBlockHeight ?? 0) + 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ if (showCreateModalProjectId) {
);
}

console.log({ filteredProjects, allRegistrations, projects, approvedProjects });

return (
<Modal
open={showModal}
Expand Down
2 changes: 1 addition & 1 deletion apps/old/widget/components/modals/propose/Text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ return (
proposalType: "Add Member",
}}
/>
{/* {console.log(notificationsData)} */}

<div className="w-100 d-flex">
<Button
className="ms-auto"
Expand Down
20 changes: 11 additions & 9 deletions src/pages/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ function Viewer({ code, widgets }) {
}, []);

return (
<Widget
src={!code && src}
code={code} // prioritize code
props={{
path: src,
...passProps,
}}
config={{ redirectMap }}
/>
<div className="bg-white">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this so "Show post" and "show comment" show -- how about we modify these links to point to the Build DAO gateway style of posts/comments?

This will involve pulling in the full notifications from mob.near so we can modify the details, but that is okay.

Copy link
Contributor

@elliotBraem elliotBraem May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itexpert120 yes I think it should all be forked, especially if we will be introducing more notification types already.

Although we do have notify.near if we'd like this to be a separate project, @Megha-Dev-19
(thinking about more customizable notifications, in how they look and how they act/link)

<Widget
src={!code && src}
code={code} // prioritize code
props={{
path: src,
...passProps,
}}
config={{ redirectMap }}
/>
</div>
);
}

Expand Down
Loading