mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Site view
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"use client"
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import useSite from "@/hooks/useSite";
|
||||
import { useEffect } from "react";
|
||||
|
||||
interface SitesPageProps {
|
||||
username: string;
|
||||
@@ -8,6 +10,13 @@ interface SitesPageProps {
|
||||
}
|
||||
|
||||
export default function SitesPage({ username, name, siteId }: SitesPageProps) {
|
||||
const { site, loadSite, setSiteId } = useSite();
|
||||
useEffect(() => {
|
||||
console.log(siteId);
|
||||
if (siteId) {
|
||||
setSiteId(siteId);
|
||||
}
|
||||
}, [siteId, setSiteId]);
|
||||
return (
|
||||
<Sidebar
|
||||
username={username}
|
||||
@@ -17,10 +26,9 @@ export default function SitesPage({ username, name, siteId }: SitesPageProps) {
|
||||
<main>
|
||||
<div className="flex gap-4 items-center">
|
||||
<div className="flex-1">
|
||||
<h1 className="text-2xl font-bold">Site</h1>
|
||||
<h1 className="text-2xl font-bold">Site - {site.name}</h1>
|
||||
<p className="text-sm opacity-70">
|
||||
Manage your sites. Sites are real-world locations where you can
|
||||
monitor your assets & add networks.
|
||||
Description: {site.description}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user