Skip to content

Instantly share code, notes, and snippets.

View matt416's full-sized avatar

Matt Rintoul matt416

View GitHub Profile
@matt416
matt416 / route.tsx
Last active June 13, 2024 14:42
# Remix action handler using form submission intent
export async function action(context: ActionFunctionArgs) {
return await serverAction(context, ["subscribeToBeNotified"]);
}
export default function Route(){
function handleSubmit(event) {
try {
const formdata = new FormData(event.currentTarget); // where event.currentTarget is a form
validateFormdata(formdata, subscribeToBeNotifiedSchema);
// submit form to server if it validates
diff --git a/app/stylesheets/partials/_basics.sass b/app/stylesheets/partials/_b
index a03f1bf..5f5b08d 100644
--- a/app/stylesheets/partials/_basics.sass
+++ b/app/stylesheets/partials/_basics.sass
@@ -19,8 +19,8 @@ ul,ol
body
:background
// CHANGEME use variable instead of hardcoded colour
- :color #E0E658
- :image= image_url("bkgr/bkgr_body.png")