Skip to content

Commit

Permalink
Merge pull request #53 from KAT-ITB-2024/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
kevinssheva authored Sep 3, 2024
2 parents bf62d28 + bff7962 commit 887ec37
Show file tree
Hide file tree
Showing 47 changed files with 2,459 additions and 2,052 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

yarn lint
npx pretty-quick --staged
yarn build
yarn build
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
npx pretty-quick --staged
yarn build
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@
"@trpc/client": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"@types/date-fns": "^2.6.0",
"@types/file-saver": "^2.0.7",
"axios": "^1.7.5",
"@types/uuid": "^10.0.0",
"axios": "^1.7.7",
"bcrypt": "^5.1.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"date-fns": "^3.6.0",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.31.2",
"file-saver": "^2.0.5",
Expand All @@ -50,9 +53,11 @@
"nodemailer": "^6.9.14",
"postgres": "^3.4.4",
"react": "^18.3.0",
"react-day-picker": "8.10.1",
"react-dom": "^18.3.0",
"react-hook-form": "^7.53.0",
"react-icons": "^5.2.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^5.3.0",
"sanitize-filename": "^1.6.3",
"server-only": "^0.0.1",
"superjson": "^2.2.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/(login)/component/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Button } from "~/components/ui/button";
import Image from "next/image";
import { FaEye, FaEyeSlash } from "react-icons/fa";
import { signIn } from "next-auth/react";
import toast from "react-hot-toast";

export default function LoginForm() {
const [showPassword, setShowPassword] = useState(false);
Expand All @@ -28,6 +29,7 @@ export default function LoginForm() {
});

if (status?.ok) {
toast.success("Logged in successfully");
router.push("/assignment");
}
};
Expand Down
5 changes: 5 additions & 0 deletions src/app/(login)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React from "react";
import LoginForm from "./component/LoginForm";
import { getServerAuthSession } from "~/server/auth";
import { redirect } from "next/navigation";

export default async function Page() {
const session = await getServerAuthSession();
const user = session?.user;

if (user) {
redirect("/assignment");
}

const backgroundStyle: React.CSSProperties = {
backgroundImage: "url(/img/background.png)",
backgroundSize: "cover",
Expand Down
263 changes: 0 additions & 263 deletions src/app/(sidebar)/assignment/components/MametSubmisiPeserta.tsx

This file was deleted.

Loading

0 comments on commit 887ec37

Please sign in to comment.