Everything's pretty much done but url.zoo.dev has been broken and we need to think about how to test reliably
This commit is contained in:
@ -99,7 +99,7 @@ function ProjectMenuPopover({
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const filePath = useAbsoluteFilePath()
|
||||
const { settings } = useSettingsAuthContext()
|
||||
const { settings, auth } = useSettingsAuthContext()
|
||||
const { commandBarState, commandBarSend } = useCommandsContext()
|
||||
const { onProjectClose } = useLspContext()
|
||||
const exportCommandInfo = { name: 'Export', groupId: 'modeling' }
|
||||
@ -188,12 +188,14 @@ function ProjectMenuPopover({
|
||||
Element: 'button',
|
||||
children: 'Share link to file',
|
||||
onClick: async () => {
|
||||
const shareUrl = createFileLink({
|
||||
const shareUrl = await createFileLink(auth.context.token, {
|
||||
code: codeManager.code,
|
||||
name: file?.name || '',
|
||||
units: settings.context.modeling.defaultUnit.current,
|
||||
})
|
||||
|
||||
console.log(shareUrl)
|
||||
|
||||
await globalThis.navigator.clipboard.writeText(shareUrl)
|
||||
toast.success(
|
||||
'Link copied to clipboard. Anyone who clicks this link will get a copy of this file. Share carefully!',
|
||||
|
Reference in New Issue
Block a user