From 73857c73754aea328e036040546574c3862aa315 Mon Sep 17 00:00:00 2001 From: Alex-zReeZ Date: Fri, 5 Jul 2024 16:33:03 +0200 Subject: [PATCH 1/2] fix: fixed jwt token fetch getting no Ip --- nextjs-interface/src/app/ui/dashboard/RenameElement.tsx | 4 +++- nextjs-interface/src/app/ui/dashboard/SeeToken.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx b/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx index da10aab..6655369 100644 --- a/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx +++ b/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx @@ -9,6 +9,7 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; +import useFindIpById from "@/lib/data"; export default function RenameElement({ id }: { id: string }) { const [newName, setNewName] = useState(""); @@ -32,6 +33,7 @@ export default function RenameElement({ id }: { id: string }) { } else { } }; + const ip = useFindIpById(id) return (
@@ -67,7 +69,7 @@ export default function RenameElement({ id }: { id: string }) { )}
- + diff --git a/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx b/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx index 6f6bbb5..c28f677 100644 --- a/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx +++ b/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx @@ -2,7 +2,7 @@ import { Button } from "@/components/ui/button"; import React, { useState } from "react"; import ShowToken from "@/app/ui/dashboard/ShowToken"; -export default function SeeToken(ip: any) { +export default function SeeToken({ip}:{ip:string}) { const [showToken, setShowToken] = useState(false); const toggleToken = () => { From 042dacbf93fad6e6a844408df93c60949fbed5f0 Mon Sep 17 00:00:00 2001 From: Alex-zReeZ Date: Fri, 5 Jul 2024 16:33:33 +0200 Subject: [PATCH 2/2] style: reformated files --- nextjs-interface/src/app/ui/dashboard/RenameElement.tsx | 4 ++-- nextjs-interface/src/app/ui/dashboard/SeeToken.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx b/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx index 6655369..1f6c658 100644 --- a/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx +++ b/nextjs-interface/src/app/ui/dashboard/RenameElement.tsx @@ -33,7 +33,7 @@ export default function RenameElement({ id }: { id: string }) { } else { } }; - const ip = useFindIpById(id) + const ip = useFindIpById(id); return (
@@ -69,7 +69,7 @@ export default function RenameElement({ id }: { id: string }) { )}
- + diff --git a/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx b/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx index c28f677..56ccbdc 100644 --- a/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx +++ b/nextjs-interface/src/app/ui/dashboard/SeeToken.tsx @@ -2,7 +2,7 @@ import { Button } from "@/components/ui/button"; import React, { useState } from "react"; import ShowToken from "@/app/ui/dashboard/ShowToken"; -export default function SeeToken({ip}:{ip:string}) { +export default function SeeToken({ ip }: { ip: string }) { const [showToken, setShowToken] = useState(false); const toggleToken = () => {