diff --git a/src/components/Profile.jsx b/src/components/Profile.jsx index f390c6e..11678d3 100644 --- a/src/components/Profile.jsx +++ b/src/components/Profile.jsx @@ -124,7 +124,7 @@ export function Profile({ user, logoutBtnHandler }) { {user?.isPro && currentSubscription ? ( diff --git a/src/components/Share.jsx b/src/components/Share.jsx index c441d6a..e0dee2d 100644 --- a/src/components/Share.jsx +++ b/src/components/Share.jsx @@ -10,14 +10,16 @@ import { Text } from './Text'; const FREE_PUBLIC_ITEM_COUNT = 1; const BASE_URL = location.origin; - +const TOGGLE_VISIBILITY_API = !window.location.origin.includes('localhost') + ? 'http://127.0.0.1:5001/web-maker-app/us-central1/toggleVisibility' + : 'https://togglevisibility-ajhkrtmkaq-uc.a.run.app'; export function Share({ user, item, onVisibilityChange, onLoginBtnClick }) { const [publicItemCount, setPublicItemCount] = useState(0); useEffect(() => { if (!user) return; window.db.getPublicItemCount(user.uid).then(c => { setPublicItemCount(c); - console.log('public items', c); + // console.log('public items', c); }); }, []); @@ -30,7 +32,7 @@ export function Share({ user, item, onVisibilityChange, onLoginBtnClick }) { let res; try { res = await fetch( - `http://127.0.0.1:5001/web-maker-app/us-central1/toggleVisibility?token=${token}&itemId=${item.id}` + `${TOGGLE_VISIBILITY_API}?token=${token}&itemId=${item.id}` ); } catch (e) { alertsService.add('Could not change visibility'); diff --git a/src/style.css b/src/style.css index 1eb66d6..f0456e7 100644 --- a/src/style.css +++ b/src/style.css @@ -1153,7 +1153,7 @@ body > #demo-frame { top: 0; bottom: 0; width: 35vw; - min-width: 35ch; + min-width: 40ch; max-width: 60ch; padding: 20px 30px; z-index: 6; @@ -2185,8 +2185,8 @@ while the theme CSS file is loading */ .asset-manager__file-ext { text-transform: uppercase; position: absolute; - bottom: 0; - right: 0; + bottom: 0.5rem; + left: 1.4rem; letter-spacing: -1px; font-weight: 800; display: none;