mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
connect folder
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user