Serializer
1
Handled
0.21 ms
Total time
default 1
serialize 1
| Data | Context | Normalizer | Encoder | Time | Caller |
|---|---|---|---|---|---|
|
array
Show contents
[ "data" => [ [ "id" => 3 "title" => "1️⃣ Apache (à ne jamais enlever)" "content" => """ RewriteEngine On\n RewriteCond %{HTTP:Authorization} .\n RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n """ "category" => "DevOps" "tags" => [ "Apache" "Server" "Ubuntu" ] "date" => "2025-12-20" "color" => "bg-cyan-100" "favorite" => false "createdAt" => "2025-12-20T00:58:01+00:00" "updatedAt" => null ] [ "id" => 2 "title" => "New note" "content" => """ import { useState, useEffect } from 'react';\n import { useDispatch, useSelector } from 'react-redux';\n import { useNavigate, useLocation } from 'react-router-dom';\n import {\n login,\n selectIsAuthenticated,\n selectIsLoading,\n selectError\n } from '@/store/slices/authSlice';\n import { Mail, Lock, Loader2, LogIn } from 'lucide-react';\n \n const Login = () => {\n const dispatch = useDispatch();\n const navigate = useNavigate();\n const location = useLocation();\n \n const isAuthenticated = useSelector(selectIsAuthenticated);\n const isLoading = useSelector(selectIsLoading);\n const error = useSelector(selectError);\n \n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n \n useEffect(() => {\n if (isAuthenticated) {\n const from = location.state?.from?.pathname || '/dashboard';\n navigate(from, { replace: true });\n }\n }, [isAuthenticated, navigate, location]);\n \n const handleSubmit = async (e) => {\n e.preventDefault();\n await dispatch(login({ email, password }));\n };\n \n return (\n <div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-950 to-slate-900">\n {/* Overlay */}\n <div className="absolute inset-0 bg-[radial-gradient(circle_at_top,_#22d3ee33,_transparent_60%),_radial-gradient(circle_at_bottom,_#6366f133,_transparent_55%)] pointer-events-none" />\n \n <div className="relative z-10 w-full max-w-md px-4">\n <div className="backdrop-blur-xl bg-slate-900/70 border border-white/10 shadow-2xl rounded-2xl px-8 py-10">\n {/* Header */}\n <div className="mb-8 text-center">\n <div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-cyan-500/10 border border-cyan-400/40 text-cyan-300">\n <LogIn className="h-6 w-6" />\n </div>\n <h1 className="text-2xl font-semibold text-slate-50">\n Connexion\n </h1>\n <p className="mt-1 text-sm text-slate-400">\n Accédez à votre espace personnel.\n </p>\n </div>\n \n <form onSubmit={handleSubmit} className="space-y-5">\n {/* Email */}\n <div className="space-y-1.5">\n <label className="block text-sm font-medium text-slate-200">\n Email\n </label>\n <div className="relative">\n <span className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400">\n <Mail className="h-4 w-4" />\n </span>\n <input\n type="email"\n placeholder="vous@example.com"\n value={email}\n onChange={e => setEmail(e.target.value)}\n className="block w-full rounded-lg border border-slate-700 bg-slate-900/60 py-2.5 pl-10 pr-3 text-sm text-slate-50 placeholder:text-slate-500 shadow-sm focus:border-cyan-400 focus:outline-none focus:ring-2 focus:ring-cyan-500/40 transition-colors"\n />\n </div>\n </div>\n \n {/* Password */}\n <div className="space-y-1.5">\n <label className="block text-sm font-medium text-slate-200">\n Mot de passe\n </label>\n <div className="relative">\n <span className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400">\n <Lock className="h-4 w-4" />\n </span>\n <input\n type="password"\n placeholder="••••••••"\n value={password}\n onChange={e => setPassword(e.target.value)}\n className="block w-full rounded-lg border border-slate-700 bg-slate-900/60 py-2.5 pl-10 pr-3 text-sm text-slate-50 placeholder:text-slate-500 shadow-sm focus:border-cyan-400 focus:outline-none focus:ring-2 focus:ring-cyan-500/40 transition-colors"\n />\n </div>\n </div>\n \n {/* Error */}\n {error && (\n <p className="text-sm text-red-400 bg-red-500/10 border border-red-500/40 rounded-md px-3 py-2">\n {error}\n </p>\n )}\n \n {/* Submit button */}\n <button\n type="submit"\n disabled={isLoading}\n className="flex w-full items-center justify-center gap-2 rounded-lg bg-gradient-to-r from-cyan-500 to-indigo-500 py-2.5 text-sm font-medium text-white shadow-lg shadow-cyan-500/30 hover:from-cyan-400 hover:to-indigo-400 focus:outline-none focus:ring-2 focus:ring-cyan-500/60 focus:ring-offset-2 focus:ring-offset-slate-900 disabled:cursor-not-allowed disabled:opacity-70 transition-all"\n >\n {isLoading ? (\n <>\n <Loader2 className="h-4 w-4 animate-spin" />\n Connexion...\n </>\n ) : (\n <>\n <LogIn className="h-4 w-4" />\n Se connecter\n </>\n )}\n </button>\n \n {/* Small helper */}\n <p className="mt-2 text-center text-xs text-slate-500">\n En continuant, vous acceptez nos conditions d'utilisation.\n </p>\n </form>\n </div>\n </div>\n </div>\n );\n };\n \n export default Login;\n """ "category" => "React" "tags" => [ "hooks" "javascript" ] "date" => "2025-12-19" "color" => "bg-purple-100" "favorite" => true "createdAt" => "2025-12-19T14:49:27+00:00" "updatedAt" => null ] ] ] |
Format: json
Show context
[ "json_encode_options" => 15 ] |
JsonEncoder (0.04 ms) | 0.21 ms |
deserialize 0
Nothing was deserialized.
normalize 0
Nothing was normalized.
denormalize 0
Nothing was denormalized.
encode 0
Nothing was encoded.
decode 0
Nothing was decoded.