+
-
- Join SupaNexTail for free !
+
+ Join SupaNexTail for free !
Create your website in a few minutes with our boilerplate. You can use
diff --git a/components/Avatar.js b/components/Avatar.js
index 8a73b51..95f55ee 100644
--- a/components/Avatar.js
+++ b/components/Avatar.js
@@ -80,7 +80,7 @@ const Avatar = ({ url, size, onUpload }) => {
)}
{uploading ? "Uploading ..." : "Update my avatar"}
diff --git a/components/Dashboard.js b/components/Dashboard.js
index ce9e773..786138f 100644
--- a/components/Dashboard.js
+++ b/components/Dashboard.js
@@ -77,7 +77,7 @@ export default function Dashboard(props) {
Email
Your current plan
-
+
{props.plan ? PriceIds[props.plan] : "Free tier"}
diff --git a/components/Layout.js b/components/Layout.js
index d209b05..e491ea6 100644
--- a/components/Layout.js
+++ b/components/Layout.js
@@ -31,7 +31,7 @@ const Layout = (props) => {
dark: "bg-white-600 font-gray-300",
};
return (
-
+
{
@@ -6,16 +8,43 @@ const Login = (props) => {
const [password, setPassword] = useState("");
const [forgot, setForgot] = useState(false);
+ const resetPassword = () => {
+ props.resetPassword(email).then((result) => {
+ if (result.error) {
+ toast.error(result.error.message);
+ } else toast.success("Check your email to reset your password!");
+ });
+ };
+
+ const login = (e) => {
+ e.preventDefault();
+
+ //Handle the login. Go to the homepage if success or display an error.
+ props
+ .signIn({
+ email: email,
+ password: password,
+ })
+ .then((result) => {
+ if (result.data) {
+ router.push("/");
+ }
+ if (result.error) {
+ toast.error(result.error.message);
+ }
+ });
+ };
+
return (
-
+
{!forgot && (
<>
-
Account Login
+
+ Account Login
+