generated from fahricansecer/boilerplate-fe
This commit is contained in:
+149
@@ -0,0 +1,149 @@
|
|||||||
|
|
||||||
|
> test-ui@0.0.1 dev /Users/haruncan/Documents/GitHub/ContentGenerator/ContentGen_FE
|
||||||
|
> next dev --webpack -p 3001
|
||||||
|
|
||||||
|
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
|
||||||
|
▲ Next.js 16.0.0 (webpack)
|
||||||
|
- Local: http://localhost:3001
|
||||||
|
- Network: http://10.0.0.196:3001
|
||||||
|
- Environments: .env
|
||||||
|
|
||||||
|
✓ Starting...
|
||||||
|
✓ Ready in 2.5s
|
||||||
|
○ Compiling /[locale]/dashboard/projects/[id] ...
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
GET /tr/dashboard/projects/178833cb-6daf-426b-92a6-f9e22a80999c 200 in 12.4s (compile: 12.0s, proxy.ts: 77ms, render: 311ms)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
GET /tr/dashboard/projects/178833cb-6daf-426b-92a6-f9e22a80999c 200 in 187ms (compile: 76ms, proxy.ts: 42ms, render: 69ms)
|
||||||
|
GET /api/auth/session 200 in 3.0s (compile: 3.0s, render: 41ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 3ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 2ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 16ms (compile: 2ms, render: 13ms)
|
||||||
|
GET /api/auth/session 200 in 29ms (compile: 3ms, render: 26ms)
|
||||||
|
GET /api/auth/session 200 in 18ms (compile: 5ms, render: 13ms)
|
||||||
|
GET /api/auth/session 200 in 49ms (compile: 25ms, render: 25ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 4ms, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 3ms, render: 17ms)
|
||||||
|
GET /api/auth/session 200 in 15ms (compile: 1380µs, render: 14ms)
|
||||||
|
GET /api/auth/session 200 in 263ms (compile: 29ms, render: 233ms)
|
||||||
|
GET /api/auth/session 200 in 65ms (compile: 7ms, render: 58ms)
|
||||||
|
GET /api/auth/session 200 in 30ms (compile: 4ms, render: 26ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 3ms, render: 16ms)
|
||||||
|
GET /tr/dashboard/projects/178833cb-6daf-426b-92a6-f9e22a80999c 200 in 415ms (compile: 4ms, proxy.ts: 5ms, render: 406ms)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (323kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
GET /api/auth/session 200 in 35ms (compile: 4ms, render: 31ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 3ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 16ms (compile: 4ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 15ms (compile: 4ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 21ms (compile: 4ms, render: 16ms)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (322kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
|
||||||
|
GET /api/auth/session 200 in 286ms (compile: 121ms, render: 165ms)
|
||||||
|
GET /api/auth/session 200 in 18ms (compile: 3ms, render: 15ms)
|
||||||
|
GET /api/auth/session 200 in 22ms (compile: 5ms, render: 17ms)
|
||||||
|
GET /api/auth/session 200 in 16ms (compile: 4ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 2ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 3ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 81ms (compile: 18ms, render: 63ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 1935µs, render: 18ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 1725µs, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 17ms (compile: 6ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 33ms (compile: 4ms, render: 29ms)
|
||||||
|
GET /api/auth/session 200 in 50ms (compile: 6ms, render: 45ms)
|
||||||
|
GET /api/auth/session 200 in 66ms (compile: 5ms, render: 61ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 4ms, render: 17ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 3ms, render: 16ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 3ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 10ms (compile: 2ms, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 3ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 34ms (compile: 7ms, render: 28ms)
|
||||||
|
GET /api/auth/session 200 in 15ms (compile: 2ms, render: 13ms)
|
||||||
|
GET /api/auth/session 200 in 69ms (compile: 36ms, render: 32ms)
|
||||||
|
GET /api/auth/session 200 in 46ms (compile: 11ms, render: 35ms)
|
||||||
|
GET /api/auth/session 200 in 56ms (compile: 6ms, render: 50ms)
|
||||||
|
GET /api/auth/session 200 in 17ms (compile: 4ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 16ms (compile: 4ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 37ms (compile: 4ms, render: 33ms)
|
||||||
|
GET /api/auth/session 200 in 12ms (compile: 1891µs, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 2ms, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 27ms (compile: 5ms, render: 22ms)
|
||||||
|
GET /api/auth/session 200 in 15ms (compile: 3ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 3ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 1386µs, render: 18ms)
|
||||||
|
GET /api/auth/session 200 in 8ms (compile: 1880µs, render: 6ms)
|
||||||
|
GET /api/auth/session 200 in 21ms (compile: 4ms, render: 16ms)
|
||||||
|
GET /api/auth/session 200 in 10ms (compile: 1119µs, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 11ms (compile: 3ms, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 160ms (compile: 6ms, render: 154ms)
|
||||||
|
GET /api/auth/session 200 in 8ms (compile: 895µs, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 11ms (compile: 999µs, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 1522µs, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 11ms (compile: 1341µs, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 5ms, render: 14ms)
|
||||||
|
GET /api/auth/session 200 in 41ms (compile: 7ms, render: 34ms)
|
||||||
|
GET /api/auth/session 200 in 18ms (compile: 5ms, render: 13ms)
|
||||||
|
GET /api/auth/session 200 in 12ms (compile: 3ms, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 1992µs, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 3ms, render: 16ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 4ms, render: 15ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 2ms, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 47ms (compile: 9ms, render: 37ms)
|
||||||
|
GET /api/auth/session 200 in 27ms (compile: 1872µs, render: 25ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 3ms, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 146ms (compile: 5ms, render: 141ms)
|
||||||
|
GET /api/auth/session 200 in 18ms (compile: 4ms, render: 14ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 1953µs, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 991µs, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 56ms (compile: 5ms, render: 52ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 3ms, render: 17ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 3ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 8ms (compile: 953µs, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 47ms (compile: 9ms, render: 38ms)
|
||||||
|
GET /api/auth/session 200 in 134ms (compile: 6ms, render: 128ms)
|
||||||
|
GET /api/auth/session 200 in 192ms (compile: 18ms, render: 174ms)
|
||||||
|
GET /api/auth/session 200 in 32ms (compile: 11ms, render: 21ms)
|
||||||
|
GET /api/auth/session 200 in 24ms (compile: 3ms, render: 21ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 5ms, render: 15ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 3ms, render: 10ms)
|
||||||
|
GET /api/auth/session 200 in 7ms (compile: 962µs, render: 6ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 925µs, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 10ms (compile: 2ms, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 9ms (compile: 1002µs, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 10ms (compile: 1910µs, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 8ms (compile: 868µs, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 15ms (compile: 1285µs, render: 14ms)
|
||||||
|
GET /api/auth/session 200 in 26ms (compile: 1425µs, render: 25ms)
|
||||||
|
GET /api/auth/session 200 in 62ms (compile: 9ms, render: 53ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 4ms, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 20ms (compile: 5ms, render: 15ms)
|
||||||
|
GET /api/auth/session 200 in 12ms (compile: 1277µs, render: 11ms)
|
||||||
|
GET /api/auth/session 200 in 13ms (compile: 4ms, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 19ms (compile: 6ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 8ms (compile: 1087µs, render: 7ms)
|
||||||
|
GET /api/auth/session 200 in 10ms (compile: 2ms, render: 8ms)
|
||||||
|
GET /api/auth/session 200 in 11ms (compile: 1613µs, render: 9ms)
|
||||||
|
GET /api/auth/session 200 in 26ms (compile: 5ms, render: 21ms)
|
||||||
|
GET /api/auth/session 200 in 17ms (compile: 4ms, render: 12ms)
|
||||||
|
GET /api/auth/session 200 in 14ms (compile: 6ms, render: 9ms)
|
||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/types/routes.d.ts";
|
import "./.next/dev/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { signIn } from "next-auth/react";
|
import { signIn } from "next-auth/react";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import { Sparkles, Mail, Lock, Loader2, ArrowRight } from "lucide-react";
|
import { Sparkles, Mail, Lock, Loader2, ArrowRight } from "lucide-react";
|
||||||
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function SignInPage() {
|
export default function SignInPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -12,6 +13,7 @@ export default function SignInPage() {
|
|||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState("");
|
const [error, setError] = useState("");
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const handleSubmit = async (e: React.FormEvent) => {
|
const handleSubmit = async (e: React.FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -35,6 +37,7 @@ export default function SignInPage() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryClient.clear();
|
||||||
router.replace("/dashboard");
|
router.replace("/dashboard");
|
||||||
} catch {
|
} catch {
|
||||||
setError("Bağlantı hatası. Lütfen tekrar deneyin.");
|
setError("Bağlantı hatası. Lütfen tekrar deneyin.");
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { useState } from "react";
|
|||||||
import { MdMail } from "react-icons/md";
|
import { MdMail } from "react-icons/md";
|
||||||
import { BiLock } from "react-icons/bi";
|
import { BiLock } from "react-icons/bi";
|
||||||
import { Link } from "@/i18n/navigation";
|
import { Link } from "@/i18n/navigation";
|
||||||
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
const schema = yup.object({
|
const schema = yup.object({
|
||||||
email: yup.string().email().required(),
|
email: yup.string().email().required(),
|
||||||
@@ -39,6 +40,7 @@ interface LoginModalProps {
|
|||||||
export function LoginModal({ open, onOpenChange }: LoginModalProps) {
|
export function LoginModal({ open, onOpenChange }: LoginModalProps) {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -62,6 +64,7 @@ export function LoginModal({ open, onOpenChange }: LoginModalProps) {
|
|||||||
throw new Error(res.error);
|
throw new Error(res.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryClient.clear();
|
||||||
onOpenChange(false);
|
onOpenChange(false);
|
||||||
toaster.success({
|
toaster.success({
|
||||||
title: t("auth.login-success") || "Login successful!",
|
title: t("auth.login-success") || "Login successful!",
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import { signOut, useSession } from "next-auth/react";
|
|||||||
import { authConfig } from "@/config/auth";
|
import { authConfig } from "@/config/auth";
|
||||||
import { LoginModal } from "@/components/auth/login-modal";
|
import { LoginModal } from "@/components/auth/login-modal";
|
||||||
import { LuLogIn } from "react-icons/lu";
|
import { LuLogIn } from "react-icons/lu";
|
||||||
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -45,6 +46,7 @@ export default function Header() {
|
|||||||
const [loginModalOpen, setLoginModalOpen] = useState(false);
|
const [loginModalOpen, setLoginModalOpen] = useState(false);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const isAuthenticated = !!session;
|
const isAuthenticated = !!session;
|
||||||
const isLoading = status === "loading";
|
const isLoading = status === "loading";
|
||||||
@@ -61,6 +63,7 @@ export default function Header() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleLogout = async () => {
|
const handleLogout = async () => {
|
||||||
|
queryClient.clear();
|
||||||
await signOut({ redirect: false });
|
await signOut({ redirect: false });
|
||||||
if (authConfig.isAuthRequired) {
|
if (authConfig.isAuthRequired) {
|
||||||
router.replace("/signin");
|
router.replace("/signin");
|
||||||
|
|||||||
Reference in New Issue
Block a user