Buckets:
| import { useParams } from "@solidjs/router" | |
| import { createMemo } from "solid-js" | |
| import { useLayout } from "@/context/layout" | |
| import { useServer } from "@/context/server" | |
| import { SessionRouteKey, SessionStateKey } from "@/utils/server-scope" | |
| export const useSessionKey = () => { | |
| const params = useParams() | |
| const server = useServer() | |
| const scope = createMemo(() => server.scope()) | |
| const workspaceKey = createMemo(() => SessionStateKey.from(scope(), SessionRouteKey.fromRoute(params.dir))) | |
| const sessionKey = createMemo(() => SessionStateKey.from(scope(), SessionRouteKey.fromRoute(params.dir, params.id))) | |
| return { params, sessionKey, workspaceKey } | |
| } | |
| export const useSessionLayout = () => { | |
| const layout = useLayout() | |
| const { params, sessionKey, workspaceKey } = useSessionKey() | |
| return { | |
| params, | |
| sessionKey, | |
| workspaceKey, | |
| tabs: createMemo(() => layout.tabs(sessionKey)), | |
| view: createMemo(() => layout.view(sessionKey)), | |
| } | |
| } | |
Xet Storage Details
- Size:
- 968 Bytes
- Xet hash:
- 4f4d592b07f067f31b081c06930643e3242672ad4857544e5f710f85b156860a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.