Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: share url (#1948)

Peng Xiao46cd0c5c9a79
diff --git a/apps/electron/README.md b/apps/electron/README.md
index e836f6a8e8..f4776ccbc3 100644
--- a/apps/electron/README.md
+++ b/apps/electron/README.md
@@ -1,21 +1,17 @@
# AFFiNE Electron App
-# ⚠️ NOTE ⚠️
-
-Due to PNPM related issues, this project is currently using **yarn 3**.
-See https://github.com/electron/forge/issues/2633
-
## Development
-```
-# in project root, start web app at :8080
-yarn dev
-
-# build octobase-node
-yarn workspace @affine/octobase-node build
+To run AFFiNE Desktop Client Application locally, run the following commands:
-# in /apps/electron, start electron app
+```sh
+# in repo root
+yarn install
yarn dev
+
+# in apps/electron
+yarn generate-assets
+yarn dev # or yarn prod for production build
```
## Credits
diff --git a/packages/component/src/components/share-menu/SharePage.tsx b/packages/component/src/components/share-menu/SharePage.tsx
index a4e7dfd7a2..50c8bb9f59 100644
--- a/packages/component/src/components/share-menu/SharePage.tsx
+++ b/packages/component/src/components/share-menu/SharePage.tsx
@@ -1,4 +1,4 @@
-import { getEnvironment } from '@affine/env';
+import { prefixUrl } from '@affine/env';
import { Trans, useTranslation } from '@affine/i18n';
import type { LocalWorkspace } from '@affine/workspace/type';
import { WorkspaceFlavour } from '@affine/workspace/type';
@@ -46,12 +46,7 @@ export const AffineSharePage: FC<ShareMenuProps> = props => {
const [showDisable, setShowDisable] = useState(false);
const { t } = useTranslation();
const sharingUrl = useMemo(() => {
- const env = getEnvironment();
- if (env.isBrowser) {
- return `${env.origin}/public-workspace/${props.workspace.id}/${props.currentPage.id}`;
- } else {
- return '';
- }
+ return `${prefixUrl}public-workspace/${props.workspace.id}/${props.currentPage.id}`;
}, [props.workspace.id, props.currentPage.id]);
const onClickCreateLink = useCallback(() => {
setIsPublic(true);