diff --git a/bun.lockb b/bun.lockb index 6193c42..ffb6975 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 02ee751..af1544c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.1.1", "sitemap": "^8.0.0", - "solar-js-sdk": "./packages/sn", + "solar-js-sdk": "^0.0.2", "unified": "^11.0.5", "zustand": "^5.0.3" }, diff --git a/packages/sn/package.json b/packages/sn/package.json index fa0c84a..694919b 100644 --- a/packages/sn/package.json +++ b/packages/sn/package.json @@ -7,7 +7,7 @@ "name": "LittleSheep", "email": "littlesheep.code@hotmail.com" }, - "version": "0.0.2", + "version": "0.0.3", "tsup": { "entry": [ "src/index.ts" diff --git a/src/pages/attachments/new.tsx b/src/pages/attachments/new.tsx deleted file mode 100644 index 967aaec..0000000 --- a/src/pages/attachments/new.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { Alert, Box, Button, CircularProgress, Collapse, Container, styled, Typography } from '@mui/material' -import { useEffect, useState } from 'react' -import { checkAuthenticatedClient, redirectToLogin, UploadAttachmentTask } from 'solar-js-sdk' - -import ErrorIcon from '@mui/icons-material/Error' -import CloudUploadIcon from '@mui/icons-material/CloudUpload' - -export function getStaticProps() { - return { - props: { - title: 'New Attachment', - }, - } -} - -const VisuallyHiddenInput = styled('input')({ - clip: 'rect(0 0 0 0)', - clipPath: 'inset(50%)', - height: 1, - overflow: 'hidden', - position: 'absolute', - bottom: 0, - left: 0, - whiteSpace: 'nowrap', - width: 1, -}) - -export default function AttachmentNew() { - useEffect(() => { - if (!checkAuthenticatedClient()) redirectToLogin() - }, []) - - const [file, setFile] = useState() - const [busy, setBusy] = useState(false) - const [error, setError] = useState(null) - - async function submit() { - if (!file) return - - try { - setBusy(true) - const task = new UploadAttachmentTask(file, 'interactive') - await task.submit() - } catch (err: any) { - setError(err.toString()) - } finally { - setBusy(false) - } - } - - return ( - - - - } severity="error"> - {error} - - - - {busy ? ( - - ) : ( - - )} - - - - Pool: Interactive - - - - - ) -}