connect folder

This commit is contained in:
Nikita
2024-09-05 11:22:45 +03:00
parent 75b4e25aee
commit 65196da23f
7 changed files with 572 additions and 5 deletions

View File

@@ -1,11 +1,28 @@
"use client"
import { useAccount } from "@/lib/providers/jazz-provider"
import { open } from "@tauri-apps/plugin-dialog"
export default function TauriRoute() {
const { me } = useAccount()
console.log({ pages: me?.root?.personalPages?.toJSON() })
// console.log({ pages: me?.root?.personalPages?.toJSON() })
return <div>{JSON.stringify(me?.root?.personalPages)}</div>
return (
<div className="mb-5 flex flex-col">
<button
onClick={async () => {
const folderPath = await open({
multiple: false,
directory: true
})
console.log(folderPath)
}}
>
Connect folder
</button>
{/* TODO: loads a lot more data than expected */}
{/* {JSON.stringify(me?.root?.personalPages)} */}
</div>
)
}