Skip to content

Commit 4da1000

Browse files
authored
Merge pull request #653 from HiEventsDev/develop
Fixes (#652)
2 parents 1671c0c + fcc5740 commit 4da1000

File tree

10 files changed

+55
-24
lines changed

10 files changed

+55
-24
lines changed

frontend/src/components/common/OrganizerDocumentHead/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const OrganizerDocumentHead = ({organizer}: OrganizerDocumentHeadProps) =
5353
if (socialHandles.facebook) sameAs.push(`https://facebook.com/${socialHandles.facebook}`);
5454
if (socialHandles.twitter) sameAs.push(`https://twitter.com/${socialHandles.twitter}`);
5555
if (socialHandles.instagram) sameAs.push(`https://instagram.com/${socialHandles.instagram}`);
56-
if (socialHandles.linkedin) sameAs.push(`https://linkedin.com/in/${socialHandles.linkedin}`);
56+
if (socialHandles.linkedin) sameAs.push(`https://linkedin.com/company/${socialHandles.linkedin}`);
5757
if (socialHandles.youtube) sameAs.push(`https://youtube.com/@${socialHandles.youtube}`);
5858
if (socialHandles.github) sameAs.push(`https://github.com/${socialHandles.github}`);
5959
}

frontend/src/components/common/PoweredByFooter/index.tsx

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {iHavePurchasedALicence, isHiEvents} from "../../../utilites/helpers.ts";
1313
*
1414
* You can find the full license text at: https://github.com/HiEventsDev/hi.events/blob/main/LICENCE
1515
*
16-
* In accordance with Section 7(b) of the AGPL, we ask that you retain the "Powered by Hi.Events" notice.
16+
* In accordance with Section 7(b) of the AGPL, you must retain the "Powered by Hi.Events" notice.
1717
*
1818
* If you wish to remove this notice, a commercial license is available at: https://hi.events/licensing
1919
*/
@@ -22,16 +22,31 @@ export const PoweredByFooter = (props: React.DetailedHTMLProps<React.HTMLAttribu
2222
return <></>;
2323
}
2424

25+
const footerContent = isHiEvents() ? (
26+
<>
27+
{t`Planning an event?`} {' '}
28+
<a href="https://hi.events?utm_source=app-powered-by-footer&utm_content=try-hi-events-free"
29+
target="_blank"
30+
className={classes.ctaLink}
31+
title={'Effortlessly manage events and sell tickets online with Hi.Events'}>
32+
{t`Try Hi.Events Free`}
33+
</a>
34+
</>
35+
) : (
36+
<>
37+
{t`Powered by`} {' '}
38+
<a href="https://hi.events?utm_source=app-powered-by-footer"
39+
target="_blank"
40+
title={'Effortlessly manage events and sell tickets online with Hi.Events'}>
41+
Hi.Events
42+
</a> 🚀
43+
</>
44+
);
45+
2546
return (
2647
<div {...props} className={classNames(classes.poweredBy, props.className)}>
2748
<div className={classes.poweredByText}>
28-
{isHiEvents() ? t`Event Ticketing by` : t`Powered by`} {' '}
29-
{/* eslint-disable-next-line lingui/no-unlocalized-strings */}
30-
<a href="https://hi.events?utm_source=app-powered-by-footer"
31-
target="_blank"
32-
title={'Effortlessly manage events and sell tickets online with Hi.Events'}>
33-
Hi.Events
34-
</a> 🚀
49+
{footerContent}
3550
</div>
3651
</div>
3752
);

frontend/src/components/layouts/AuthLayout/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
} from '@tabler/icons-react';
1919
import {useMemo} from "react";
2020
import { getConfig } from "../../../utilites/config.ts";
21+
import {isHiEvents} from "../../../utilites/helpers.ts";
2122

2223
const RegisterFeatures = () => (
2324
<div className={classes.featureGrid}>
@@ -148,7 +149,7 @@ const AuthLayout = () => {
148149
* If you wish to remove this notice, a commercial license is available at: https://hi.events/licensing
149150
*/
150151
}
151-
<PoweredByFooter/>
152+
{!isHiEvents() && <PoweredByFooter/>}
152153
<div className={classes.languageSwitcher}>
153154
<LanguageSwitcher/>
154155
</div>

frontend/src/components/layouts/EventHomepage/EventHomepage.module.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,7 @@
240240

241241
.mapLink {
242242
color: var(--homepage-secondary-color);
243-
opacity: 0.7;
244243
transition: opacity 0.2s ease;
245-
246-
&:hover {
247-
opacity: 1;
248-
}
249244
}
250245

251246
.organizerWebsite {

frontend/src/components/layouts/EventHomepage/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,14 @@ const EventHomepage = ({colors, continueButtonText, backgroundType, ...loaderDat
230230
{getShortLocationDisplay(organizerLocation) && (
231231
<div className={classes.organizerLocation}>
232232
<IconMapPin size={16}/>
233-
<span>{getShortLocationDisplay(organizerLocation)}</span>
234233
<Anchor
235234
href={getGoogleMapsUrl(organizerLocation!)}
236235
target="_blank"
237236
rel="noopener noreferrer"
238237
className={classes.mapLink}
239238
>
239+
<span>{getShortLocationDisplay(organizerLocation)}</span>
240+
&nbsp;
240241
<IconExternalLink size={14}/>
241242
</Anchor>
242243
</div>

frontend/src/components/layouts/OrganizerHomepage/OrganizerHomepage.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@
233233

234234
.mapLink {
235235
color: var(--secondary-text-color);
236-
opacity: 0.7;
237236
transition: opacity 0.2s ease;
238237
margin-left: 4px;
239238

frontend/src/components/layouts/OrganizerHomepage/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ export const OrganizerHomepage = ({
161161
{getShortLocationDisplay(organizer?.settings?.location_details) && (
162162
<div className={classes.metaItem}>
163163
<IconMapPin size={16} className={classes.metaIcon}/>
164-
<span>{getShortLocationDisplay(organizer.settings!.location_details)}</span>
165164
<a
166165
href={getGoogleMapsUrl(organizer.settings!.location_details)}
167166
target="_blank"
168167
rel="noopener noreferrer"
169168
className={classes.mapLink}
170169
>
170+
<span>{getShortLocationDisplay(organizer.settings!.location_details)}</span>
171+
&nbsp;
171172
<IconExternalLink size={14}/>
172173
</a>
173174
</div>

frontend/src/components/routes/welcome/index.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Card} from "../../common/Card";
55
import {Button, Center, Container, PinInput, Select, Stack, Text, TextInput} from "@mantine/core";
66
import classes from "./Welcome.module.scss";
77
import {useForm} from "@mantine/form";
8-
import {useMediaQuery} from "@mantine/hooks";
8+
import {useDebouncedValue, useMediaQuery} from "@mantine/hooks";
99
import {Event} from "../../../types.ts";
1010
import {useCreateEvent} from "../../../mutations/useCreateEvent.ts";
1111
import {NavLink, useNavigate} from "react-router";
@@ -57,6 +57,7 @@ const ConfirmVerificationPin = ({progressInfo}: {
5757
const confirmEmailMutation = useConfirmEmailWithCode();
5858
const resendMutation = useResendEmailConfirmation();
5959
const [resendCooldown, setResendCooldown] = useState(0);
60+
const [completedPin, setCompletedPin] = useState('');
6061
const isMobile = useMediaQuery('(max-width: 768px)');
6162

6263
const form = useForm({
@@ -68,6 +69,16 @@ const ConfirmVerificationPin = ({progressInfo}: {
6869
}
6970
});
7071

72+
// Debounce the completed pin value
73+
const [debouncedPin] = useDebouncedValue(completedPin, 800);
74+
75+
// Auto-submit when debounced pin is complete
76+
useEffect(() => {
77+
if (debouncedPin.length === 5 && !confirmEmailMutation.isPending) {
78+
handleSubmit({pin: debouncedPin});
79+
}
80+
}, [debouncedPin]);
81+
7182
useEffect(() => {
7283
if (resendCooldown > 0) {
7384
const timer = setTimeout(() => setResendCooldown(resendCooldown - 1), 1000);
@@ -83,9 +94,13 @@ const ConfirmVerificationPin = ({progressInfo}: {
8394
onSuccess: () => {
8495
showSuccess(t`Email verified successfully!`);
8596
form.reset();
97+
setCompletedPin('');
8698
},
8799
onError: (error) => {
88100
showError(error.response?.data?.message || t`Failed to verify email`);
101+
// Clear the pin on error so user can try again
102+
form.reset();
103+
setCompletedPin('');
89104
}
90105
}
91106
);
@@ -148,9 +163,13 @@ const ConfirmVerificationPin = ({progressInfo}: {
148163
error={!!form.errors.pin}
149164
className={classes.pinInput}
150165
gap={isMobile ? 8 : "sm"}
151-
onComplete={(value) => {
166+
onChange={(value) => {
152167
form.setFieldValue('pin', value);
153-
handleSubmit({pin: value});
168+
if (value.length === 5) {
169+
setCompletedPin(value);
170+
} else {
171+
setCompletedPin('');
172+
}
154173
}}
155174
/>
156175
</Center>

frontend/src/constants/socialMediaConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const socialMediaConfig = {
2525
facebook: {icon: IconBrandFacebook, baseUrl: 'https://facebook.com/'},
2626
instagram: {icon: IconBrandInstagram, baseUrl: 'https://instagram.com/'},
2727
twitter: {icon: IconBrandX, baseUrl: 'https://twitter.com/'},
28-
linkedin: {icon: IconBrandLinkedin, baseUrl: 'https://linkedin.com/in/'},
28+
linkedin: {icon: IconBrandLinkedin, baseUrl: 'https://linkedin.com/company/'},
2929
discord: {icon: IconBrandDiscord, baseUrl: 'https://discord.com/users/'},
3030
tiktok: {icon: IconBrandTiktok, baseUrl: 'https://tiktok.com/@'},
3131
youtube: {icon: IconBrandYoutube, baseUrl: 'https://youtube.com/@'},
@@ -42,4 +42,4 @@ export const socialMediaConfig = {
4242
tumblr: {icon: IconBrandTumblr, baseUrl: 'https://tumblr.com/blog/'},
4343
vimeo: {icon: IconBrandVimeo, baseUrl: 'https://vimeo.com/'},
4444
github: {icon: IconBrandGithub, baseUrl: 'https://github.com/'},
45-
};
45+
};

frontend/src/utilites/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const isSsr = () => import.meta.env.SSR;
102102
*
103103
* You can find the full license text at: https://github.com/HiEventsDev/hi.events/blob/main/LICENCE
104104
*
105-
* In accordance with Section 7(b) of the AGPL, we ask that you retain the "Powered by Hi.Events" notice.
105+
* In accordance with Section 7(b) of the AGPL, you must retain the "Powered by Hi.Events" notice.
106106
*
107107
* If you wish to remove this notice, a commercial license is available at: https://hi.events/licensing
108108
*/

0 commit comments

Comments
 (0)