Compare commits

...

3 Commits

Author SHA1 Message Date
Philip Okugbe d1ae117f76 v0.2.1
client: fix APP_URL usage
2024-07-01 10:25:36 +01:00
Philipinho eea4e62c2e v0.2.1 2024-07-01 10:09:28 +01:00
Philipinho d429384d22 client: fix APP_URL 2024-07-01 10:08:12 +01:00
5 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "client", "name": "client",
"private": true, "private": true,
"version": "0.2.0", "version": "0.2.1",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc && vite build", "build": "tsc && vite build",
@@ -19,7 +19,6 @@ import { getAppUrl } from "@/lib/config.ts";
import { extractPageSlugId } from "@/lib"; import { extractPageSlugId } from "@/lib";
import { treeApiAtom } from "@/features/page/tree/atoms/tree-api-atom.ts"; import { treeApiAtom } from "@/features/page/tree/atoms/tree-api-atom.ts";
import { useDeletePageModal } from "@/features/page/hooks/use-delete-page-modal.tsx"; import { useDeletePageModal } from "@/features/page/hooks/use-delete-page-modal.tsx";
import { boolean } from "zod";
interface PageHeaderMenuProps { interface PageHeaderMenuProps {
readOnly?: boolean; readOnly?: boolean;
+3 -5
View File
@@ -7,13 +7,11 @@ declare global {
export function getAppUrl(): string { export function getAppUrl(): string {
let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL; let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL;
if (!appUrl) { if (import.meta.env.DEV) {
appUrl = import.meta.env.DEV return appUrl || "http://localhost:3000";
? "http://localhost:3000"
: window.location.protocol + "//" + window.location.host;
} }
return appUrl; return `${window.location.protocol}//${window.location.host}`;
} }
export function getBackendUrl(): string { export function getBackendUrl(): string {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "server", "name": "server",
"version": "0.2.0", "version": "0.2.1",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "docmost", "name": "docmost",
"homepage": "https://docmost.com", "homepage": "https://docmost.com",
"version": "0.2.0", "version": "0.2.1",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "nx run-many -t build", "build": "nx run-many -t build",