Skip to content

Commit

Permalink
updated tab flow and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daria-github committed Jan 17, 2024
1 parent af40140 commit 8d5c0e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 122 deletions.
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import vitePreprocessor from "cypress-vite";

export default defineConfig({
env: {
server_url: "http://localhost:5177",
server_url: "http://localhost:5173",
},

e2e: {
Expand Down
121 changes: 0 additions & 121 deletions cypress/e2e/portable_consent.cy.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const AcceptOrDeny = ({ address }: { address: string }) => {
const { t } = useTranslation();
const { allow, deny } = useConsent();
const activeTab = useXmtpStore((s) => s.activeTab);
const setActiveTab = useXmtpStore((s) => s.setActiveTab);

const [modalOpen, setModalOpen] = useState(true);

return activeTab === "requests" && modalOpen ? (
Expand All @@ -49,6 +51,7 @@ const AcceptOrDeny = ({ address }: { address: string }) => {
className="text-indigo-600 flex w-full justify-center border border-2 border-indigo-600 rounded-md p-2 hover:bg-indigo-600 hover:text-white"
onClick={() => {
void allow([address]);
setActiveTab("messages");
setModalOpen(false);
}}>
{t("consent.accept")}
Expand All @@ -58,6 +61,7 @@ const AcceptOrDeny = ({ address }: { address: string }) => {
className="text-red-600 flex w-full justify-center border border-2 border-red-600 rounded-md p-2 hover:bg-red-600 hover:text-white"
onClick={() => {
void deny([address]);
setActiveTab("blocked");
setModalOpen(false);
}}>
{t("consent.block")}
Expand Down

0 comments on commit 8d5c0e7

Please sign in to comment.