diff --git a/components/Cards.jsx b/components/Cards.jsx
index a4ff65ed..8d0c2f79 100644
--- a/components/Cards.jsx
+++ b/components/Cards.jsx
@@ -1,7 +1,5 @@
import { asUrl } from "@inrupt/solid-client";
import { useWebId } from "swrlit";
-import { useWorkspaceContext } from "../contexts/WorkspaceContext";
-import { useGarden } from '../hooks/concepts';
import { Loader } from './elements'
import NoteCard from "./cards/NoteCard"
import ImageCard from "./cards/ImageCard"
@@ -40,10 +38,8 @@ export function CardsFromGarden({ garden, webId, workspaceSlug }) {
);
}
-export default function Cards({ }) {
- const myWebId = useWebId()
- const { slug: workspaceSlug, webId } = useWorkspaceContext()
- const { garden } = useGarden(webId, workspaceSlug);
+export default function Cards({ workspaceSlug, webId, garden }) {
+ const myWebId = useWebId();
return (
<>
diff --git a/components/Dashboard.jsx b/components/Dashboard.jsx
index f3f72505..be6b7e3e 100644
--- a/components/Dashboard.jsx
+++ b/components/Dashboard.jsx
@@ -1,18 +1,31 @@
+import { useState } from 'react'
import { useWebId } from 'swrlit'
import WebMonetization from '../components/WebMonetization'
import HeaderWithData from '../components/HeaderWithData'
import { WorkspaceProvider } from '../contexts/WorkspaceContext'
+import { useGarden } from '../hooks/concepts';
import Cards from '../components/Cards';
export default function Dashboard() {
- const webId = useWebId()
+ const webId = useWebId();
+ const workspaceSlug = 'default';
+ const { garden } = useGarden(webId, workspaceSlug);
+
+ const [search, setSearch] = useState('');
+
return (
<>
-
+ {
+ console.log(s);
+ setSearch(s);
+ }}
+ />
-
-
+
+
>
diff --git a/components/Header.jsx b/components/Header.jsx
index 933f4ba3..21ab952e 100644
--- a/components/Header.jsx
+++ b/components/Header.jsx
@@ -40,10 +40,17 @@ function ActiveModal({ title, open, onClose, conceptNames }) {
}
}
-export default function Header({ profile, loggedIn, logout, conceptNames, type }) {
+export default function Header({
+ profile,
+ loggedIn,
+ logout,
+ conceptNames,
+ type,
+ onSearch,
+}) {
const avatarImgSrc = profile && getUrl(profile, FOAF.img);
const [activeModal, setActiveModal] = useState(undefined);
- const bg = (type == 'dashboard') ? 'bg-header-gradient' : 'bg-my-green';
+ const bg = type == 'dashboard' ? 'bg-header-gradient' : 'bg-my-green';
return (
}
inputClassName="ipt-header-search"
+ onChange={(e) => {
+ e.preventDefault();
+ onSearch(e.target.value);
+ }}
/>
diff --git a/components/HeaderWithData.jsx b/components/HeaderWithData.jsx
index a94b5862..52503fe6 100644
--- a/components/HeaderWithData.jsx
+++ b/components/HeaderWithData.jsx
@@ -10,6 +10,13 @@ export default function HeaderWithData(props) {
const { logout } = useAuthentication()
const conceptNames = useConceptNames()
return (
-
- )
+
+ );
}
\ No newline at end of file
diff --git a/components/cards/NoteCard.jsx b/components/cards/NoteCard.jsx
index 79d6777d..0b0d0b47 100644
--- a/components/cards/NoteCard.jsx
+++ b/components/cards/NoteCard.jsx
@@ -6,6 +6,7 @@ import { DCTERMS, FOAF } from "@inrupt/vocab-common-rdf";
import { conceptIdFromUri } from "../../model/concept";
import { notePath, urlSafeIdToConceptName } from "../../utils/uris";
import { getRelativeTime } from '../../utils/time.js';
+import { workspace } from "rdf-namespaces/dist/space";
export default function NoteCard({ concept, workspaceSlug, webId }) {
const uri = asUrl(concept);
diff --git a/pages/u/[handle].jsx b/pages/u/[handle].jsx
index 6e7d76e9..a0d41e31 100644
--- a/pages/u/[handle].jsx
+++ b/pages/u/[handle].jsx
@@ -16,6 +16,9 @@ export default function ProfilePage() {
const router = useRouter()
const { query: { handle } } = router
const webId = handleToWebId(handle)
+ const workspaceSlug = 'default';
+ const { garden } = useGarden(webId, workspaceSlug);
+
const { profile } = useProfile(webId)
const name = profile && getStringNoLocale(profile, FOAF.name)
@@ -67,8 +70,8 @@ export default function ProfilePage() {
))}
-
-
+
+