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

Contact Us v1 #1

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Contact Us v1 #1

wants to merge 21 commits into from

Conversation

Ankit09osr
Copy link

@Ankit09osr Ankit09osr commented Jun 11, 2024

Contains:
Auth implementation
Contact US Authentication
Recaptcha implementation
Contact US Recaptcha Implementation front and backend.
Contact us for Data Submission
Contact us Image Attachments

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
adi-next-form 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 2:28pm

src/components/ContactForm/ContactForm.tsx Outdated Show resolved Hide resolved
src/components/ContactForm/ContactForm.tsx Outdated Show resolved Hide resolved
src/components/ContactForm/ContactForm.tsx Outdated Show resolved Hide resolved
src/components/ContactForm/ContactForm.tsx Outdated Show resolved Hide resolved
src/components/ContactForm/useContactForm.ts Outdated Show resolved Hide resolved
src/components/ContactForm/useContactForm.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@ericgrigorian ericgrigorian left a comment

Choose a reason for hiding this comment

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

a few comments, also can you please change your strings to use single quotes like they are everywhere else? I see that everything flipped from double to single

src/components/Recaptcha/Recaptcha.tsx Outdated Show resolved Hide resolved
src/hooks/contact/contact.ts Outdated Show resolved Hide resolved
src/hooks/contact/contact.ts Outdated Show resolved Hide resolved
src/lib/contact/contact.ts Show resolved Hide resolved
src/components/Recaptcha/index.ts Outdated Show resolved Hide resolved
@Ankit09osr
Copy link
Author

a few comments, also can you please change your strings to use single quotes like they are everywhere else? I see that everything flipped from double to single

@ericgrigorian The double quotes are done because it was more consistent with Main app however we can decide and I can run the linter again later.

@@ -0,0 +1,34 @@
import { useState } from "react";
import { FieldValues } from "react-hook-form";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typings from abstracted libraries should be avoided in most cases. Consider if this is the case because this type is very wide. Using FieldValues from Blocks narrows the FieldValues, but maybe more than you would like. Since it is being used in the submit handler, perhaps the interface for the form default values is a better choice? Your call, just something to think about.

import '@fontsource/roboto/700.css';
import { createTheme, ThemeProvider } from '../../components/dist';
import React from "react";
import { CssBaseline } from "@mui/material";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Blocks also provides a CssBaseline and should be favored. However, it may collide with underlying MUI typings. If that is the case, we should get a ticket in the Blocks backlog to address it through either me or Colin

Copy link
Collaborator

@tonym tonym left a comment

Choose a reason for hiding this comment

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

This is exceptionally well done and organized. I left some notes on things to consider for future stuff, and the only requested change here is to remove the Roboto font. In the main CMS app, the font will be there, and the Blocks theme will expect it by default. Otherwise, good job on a short schedule!

import { createTheme, ThemeProvider } from '../../components/dist';
import React from "react";
import { CssBaseline } from "@mui/material";
import "@fontsource/roboto/300.css";
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't need this. Asics fonts should be used instead. Not sure if Colin added them to the Blocks package, but if not, we should add them and use those.


const theme = createTheme({
typography: {
fontFamily: '"Roboto", "Helvetica", Helvetica, Arial, sans-serif'
}
fontFamily: '"Roboto", "Helvetica", Helvetica, Arial, sans-serif',
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be removed in favor of the default Asics fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants