Skip to content

Commit

Permalink
fix(client): add info about signup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo committed Apr 23, 2023
1 parent fbe6b3f commit 588ad4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/client/public/locales/en-US/signup.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"title": "Sign Up",
"alert": "By creating an user you'll automatically agree to our Terms of Service.\nBe aware that this user is not active by default, it'll go on a validation period and you'll be emailed about this validation.",
"errors": {
"user": {
"existing": "There's a user with this email or username already."
Expand Down
8 changes: 7 additions & 1 deletion apps/client/src/components/Forms/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { SubmitHandler, useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import axios from "axios";
import { AlertTriangle, UserPlus } from "lucide-react";
import { AlertCircle, AlertTriangle, UserPlus } from "lucide-react";
import { useRouter } from "next/router";
import { useTranslation } from "next-i18next";

Expand Down Expand Up @@ -70,6 +70,12 @@ export function SignUpForm() {
className="flex flex-col gap-y-2.5 lg:mx-auto lg:w-1/2"
onSubmit={handleSubmit(handleAuth)}
>
<div className="flex items-center gap-x-2 rounded-lg border border-cyan-500 bg-cyan-400/20 p-2">
<AlertCircle className="min-h-[1.25rem] min-w-[1.25rem] stroke-cyan-600 dark:stroke-cyan-200" />
<small className="text-cyan-600 dark:text-cyan-200">
{t("signup:alert")}
</small>
</div>
{signUpStatus?.status === "error" ? (
<div className="flex gap-x-2 rounded-lg border border-red-500 bg-red-400/20 p-2">
<AlertTriangle className="stroke-red-600 dark:stroke-red-200" />
Expand Down

0 comments on commit 588ad4f

Please sign in to comment.