Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Share URL configurable #523

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
DUO_IMAGES_URL: https://user-images.duolicious.app
DUO_AUDIO_URL: https://user-audio.duolicious.app
DUO_STATUS_URL: https://status.duolicious.app
DUO_WEB_BASE_URL: https://web.duolicious.app
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const config: ExpoConfig = {
imagesUrl: process.env.DUO_IMAGES_URL,
audioUrl: process.env.DUO_AUDIO_URL,
statusUrl: process.env.DUO_STATUS_URL,
webUrl: process.env.DUO_WEB_BASE_URL,
},
web: {
favicon: "./assets/favicon.png"
Expand Down
5 changes: 3 additions & 2 deletions components/traits-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { DuoliciousTopNavBar } from './top-nav-bar';
import { referrerId } from '../App';
import { api } from '../api/api';
import { useFocusEffect } from '@react-navigation/native';
import { WEB_BASE_URL } from '../env/env';

const sideMargins: StyleProp<ViewStyle> = {
marginLeft: 10,
Expand All @@ -32,12 +33,12 @@ const sideMargins: StyleProp<ViewStyle> = {
const ShareNotice = ({personId}) => {
const [isCopied, setIsCopied] = useState(false);

const url = `https://web.duolicious.app/me/${personId}`;
const url = `${WEB_BASE_URL}/me/${personId}`;

const onPressNotice = useCallback(async () => {
await Clipboard.setStringAsync(url);
setIsCopied(true);
}, []);
}, [url]);

return (
<Pressable
Expand Down
1 change: 1 addition & 0 deletions env/env.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export const CHAT_URL = Constants.expoConfig?.extra?.chatUrl ?? 'ws://localhost:
export const IMAGES_URL = Constants.expoConfig?.extra?.imagesUrl ?? 'http://localhost:9090/s3-mock-bucket';
export const AUDIO_URL = Constants.expoConfig?.extra?.audioUrl ?? 'http://localhost:9090/s3-mock-audio-bucket';
export const STATUS_URL = Constants.expoConfig?.extra?.statusUrl ?? 'http://localhost:8080';
export const WEB_BASE_URL = Constants.expoConfig?.extra?.webUrl ?? 'http://localhost:8081';
Loading