-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: button to send emails to self in admin dashboard (so I can test…
… things)
- Loading branch information
Showing
4 changed files
with
56 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 25 additions & 1 deletion
26
apps/forge/src/routes/_authenticated/admin/notifications/email/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
import { createFileRoute } from "@tanstack/react-router"; | ||
import Title from "@/components/title"; | ||
import { Button } from "@ui/components/ui/button.tsx"; | ||
import axiosInstance from "@/api/axiosInstance.ts"; | ||
|
||
const EmailIndexPage = () => { | ||
const handleSendEmail = async () => { | ||
try { | ||
await axiosInstance.post("/test_email"); // Make the POST request to the endpoint | ||
console.log("Email sent successfully"); | ||
} catch (error) { | ||
console.error("Error sending email:", error); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="container mx-auto p-4"> | ||
<Title prompt="Emails" /> | ||
<div className="p-6 bg-card rounded-lg"> | ||
<h3 className="text-2xl font-bold mb-4">Test Email Sending</h3> | ||
<Button onClick={handleSendEmail}>Send Email to Self</Button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export const Route = createFileRoute("/_authenticated/admin/notifications/email/")({ | ||
component: () => <div>Hello /_authenticated/admin/notifications/email/!</div>, | ||
component: EmailIndexPage, | ||
}); |
12 changes: 0 additions & 12 deletions
12
apps/forge/src/routes/_authenticated/user/profile/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
import Title from "@/components/title"; | ||
import { createFileRoute } from "@tanstack/react-router"; | ||
import { RouteUnfinished } from "@/components/routing/RouteUnfinished.tsx"; | ||
|
||
const UserProfilePageComponent = () => { | ||
return ( | ||
<> | ||
<Title prompt="Profile" /> | ||
<div className="p-2"> | ||
<h3>USER Profile PAGE</h3> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export const Route = createFileRoute("/_authenticated/user/profile/")({ | ||
component: RouteUnfinished, | ||
}); |