Skip to content

Commit

Permalink
Merge pull request #48 from solun-pm/dev
Browse files Browse the repository at this point in the history
Updates and small bug fixes
  • Loading branch information
DanielWTE authored Jul 15, 2024
2 parents 9de9687 + 8487037 commit 9e43a06
Show file tree
Hide file tree
Showing 5 changed files with 1,196 additions and 490 deletions.
8 changes: 2 additions & 6 deletions app/[...login]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,12 @@ const LoginPage = ({ params }: { params: { login: string[] } }) => {
setPassword(event.target.value);
};

const isValidForm = () => {
return formData.fqe && password;
};

const handleSubmit = async (e: any) => {
e.preventDefault();

setIsSubmitting(true);

if (!isValidForm()) {
if (!formData.fqe || !password) {
setIsSubmitting(false);
return;
}
Expand Down Expand Up @@ -336,7 +332,7 @@ const LoginPage = ({ params }: { params: { login: string[] } }) => {
<button
type="submit"
className="bg-blue-500 hover:bg-blue-600 text-white font-bold w-full py-3 rounded transition duration-200 flex justify-center items-center"
disabled={!isValidForm() || isSubmitting}
disabled={isSubmitting || !formData.fqe || !password}
>
{isSubmitting && (
<FontAwesomeIcon
Expand Down
2 changes: 1 addition & 1 deletion app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const RegisterPage = () => {
<button
type="submit"
className="bg-blue-500 hover:bg-blue-600 text-white font-bold w-full py-3 rounded transition duration-200 flex justify-center items-center"
disabled={!isValidForm() || isSubmitting || disabled}
disabled={isValidForm() ? false : true || isSubmitting || disabled}
>
{isSubmitting && (
<FontAwesomeIcon
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import("next").NextConfig} */
const nextConfig = {
experimental: { appDir: true, serverComponentsExternalPackages: ["mongoose"], mdxRs: true, },
experimental: { serverComponentsExternalPackages: ["mongoose"], mdxRs: true, },
webpack(config) {
config.experiments = { ...config.experiments, topLevelAwait: true };
return config;
Expand Down
Loading

0 comments on commit 9e43a06

Please sign in to comment.