diff --git a/src/components/user/User.tsx b/src/components/user/User.tsx index 102ed67..581c80b 100644 --- a/src/components/user/User.tsx +++ b/src/components/user/User.tsx @@ -50,12 +50,19 @@ const User: Component = (props) => { return { token: uuid(), subscriptions: [], ...values() }; }; - const invitationLink = () => { + const invitationLink = (type = 'https') => { // TODO: make these URLs configurable - const configUrl = `https://admin.dyomedea.app/api/conf/${ - getValues().token - }`; - return `https://web.dyomedea.app#${btoa(configUrl)}`; + if (type === 'https') { + const configUrl = `https://admin.dyomedea.app/api/conf/${ + getValues().token + }`; + return `https://web.dyomedea.app#${btoa(configUrl)}`; + } else { + const configUrl = `https://admin.dyomedea.app/api/conf/${ + getValues().token + }`; + return `geo:?invitation=${btoa(configUrl)}`; + } }; const submitHandler = async (values: any, context: any) => { @@ -329,8 +336,12 @@ const User: Component = (props) => {

{userId(data('username'), data('database'))}

+ Invitations : - Invitation + https + + + geo