Skip to content

Commit

Permalink
Merge pull request #41 from choutkamartin/dev
Browse files Browse the repository at this point in the history
Merge dev branch to main
  • Loading branch information
choutkamartin committed Mar 15, 2022
2 parents 59d85fd + 3afde7a commit ecbe68d
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 60 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ yarn-error.log*

# vercel
.vercel

# vscode
.vscode
2 changes: 0 additions & 2 deletions components/Anchor.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { forwardRef } from "react";
import { useRouter } from "next/router";
import Link from "next/link";
import { joinClassNames } from "utils/helpers";

export default forwardRef(function Anchor(
{ children, to, type, variant, className },
ref
) {
const router = useRouter();
const getClassNames = () => {
var styles;
if (type === "link") {
Expand Down
3 changes: 0 additions & 3 deletions components/inputs/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export default function Input({
}) {
const [mutableType, setMutableType] = useState(type);

/**
* A function, setting the input type text or password based on the current already mutated type.
*/
function setPasswordVisibility() {
if (mutableType === "password") {
setMutableType("text");
Expand Down
4 changes: 0 additions & 4 deletions components/layout/label/LabelLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import Toolbar from "components/layout/label/LabelToolbar";
import SidebarLeft from "components/layout/label/LabelSidebarLeft";
import SidebarRight from "components/layout/label/LabelSidebarRight";

export default function LabelLayout({ children }) {
return children;
}
2 changes: 0 additions & 2 deletions components/layout/label/LabelSidebarRight.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
ChevronDownIcon,
ChevronUpIcon,
PlusIcon,
XIcon,
} from "@heroicons/react/outline";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useState } from "react";
Expand All @@ -14,7 +13,6 @@ import {
faDrawPolygon,
faEdit,
faSquare,
faTimes,
faTimesCircle,
} from "@fortawesome/free-solid-svg-icons";

Expand Down
4 changes: 2 additions & 2 deletions pages/api/auth/send-recovery-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default async function handler(req, res) {
value: recoveryToken,
expiresAt: new Date(currentDate.getTime() + 20 * 60 * 1000),
};
user.save(function (err, result) {
user.save(function (err) {
if (err) {
console.log(err);
res.status(500).end();
} else {
const recoveryLink = `${url}${setNewPassword}?token=${recoveryToken}`;
sendRecoveryEmail(email, recoveryLink).then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion pages/api/auth/set-new-password.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import dbConnect from "lib/dbConnect";

export default async function handler(req, res) {
await dbConnect();
const { email, name, password, passwordRepeat } = req.body;
const { email, password, passwordRepeat } = req.body;
const salt = process.env.PASSWORD_SALT;
if (password === passwordRepeat) {
const hashedPassword = scryptSync(password, salt, 32).toString("hex");
Expand Down
4 changes: 0 additions & 4 deletions pages/auth/sign-up.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ function SignUp() {
formState: { errors },
} = useForm();

/**
* Submit the form to the API
* @param {Object} data Form data
*/
const onSubmit = async (data) => {
setError(null);
const response = await fetch("/api/auth/sign-up", {
Expand Down
7 changes: 0 additions & 7 deletions pages/user/api-keys.jsx

This file was deleted.

7 changes: 0 additions & 7 deletions pages/user/billing-info.jsx

This file was deleted.

22 changes: 1 addition & 21 deletions pages/user/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,14 @@ import Input from "components/inputs/Input";
import Form from "components/forms/Form";
import Paragraph from "components/Paragraph";
import path from "utils/path";
import {
faKey,
faMoneyBill,
faUser,
faUsers,
} from "@fortawesome/free-solid-svg-icons";
import { faUser } from "@fortawesome/free-solid-svg-icons";

const sidebarData = [
{
name: "Profile",
href: path.user.profile,
icon: faUser,
},
{
name: "Team",
href: path.user.team,
icon: faUsers,
},
{
name: "API keys",
href: path.user.apiKeys,
icon: faKey,
},
{
name: "Billing",
href: path.user.billingInfo,
icon: faMoneyBill,
},
];

function Profile() {
Expand Down
7 changes: 0 additions & 7 deletions pages/user/team.jsx

This file was deleted.

1 comment on commit ecbe68d

@vercel
Copy link

@vercel vercel bot commented on ecbe68d Mar 15, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.