+
diff --git a/apps/happin-web/components/page_components/EventPageComponents/EventGallery.tsx b/apps/happin-web/components/page_components/EventPageComponents/EventGallery.tsx
index 6c41109c..c155b578 100644
--- a/apps/happin-web/components/page_components/EventPageComponents/EventGallery.tsx
+++ b/apps/happin-web/components/page_components/EventPageComponents/EventGallery.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import Slider from 'react-slick';
import classnames from 'classnames';
-import { Left, Right } from '@icon-park/react';
+import IconPark from '@components/IconPark';
function Arrow(props: any) {
const { className, onClick, children } = props;
@@ -59,8 +59,8 @@ const settings = {
}
}
],
- nextArrow:
,
- prevArrow:
,
+ nextArrow:
,
+ prevArrow:
,
};
export type galleryItemProp = {
id: string;
diff --git a/apps/happin-web/components/page_components/EventPageComponents/EventHost.tsx b/apps/happin-web/components/page_components/EventPageComponents/EventHost.tsx
index 8acba07f..aafe47d0 100644
--- a/apps/happin-web/components/page_components/EventPageComponents/EventHost.tsx
+++ b/apps/happin-web/components/page_components/EventPageComponents/EventHost.tsx
@@ -1,7 +1,7 @@
import { Avatar, Stack } from '@chakra-ui/react';
import React, { Fragment, useState } from 'react';
import { Dialog, Transition } from '@headlessui/react';
-import { CloseSmall } from '@icon-park/react';
+import IconPark from '@components/IconPark';
type EventHostProps = {
hostName?: string;
@@ -72,7 +72,7 @@ const EventHost = (props: EventHostProps) => {
Contact the organizer
setIsOpen(false)}>
-
+
{/*
Common questions:
diff --git a/apps/happin-web/components/page_components/EventPageComponents/EventSEO.tsx b/apps/happin-web/components/page_components/EventPageComponents/EventSEO.tsx
new file mode 100644
index 00000000..4e0eb4fc
--- /dev/null
+++ b/apps/happin-web/components/page_components/EventPageComponents/EventSEO.tsx
@@ -0,0 +1,91 @@
+import React, { useEffect, useState } from 'react';
+import Head from 'next/head';
+import { EventData } from 'lib/model/event';
+import { PRODUCTION_URL } from 'utils/constants';
+import { useRouter } from 'next/router';
+
+type EventSEOProps = {
+ eventData: EventData
+}
+const EventSEO = ({ eventData }: EventSEOProps) => {
+ const router = useRouter();
+ const [location, setLocation] = useState('Stream Via Happin');
+ const [description, setDescription] = useState(
+ ' - You can watch livestream on https://livestream.happin.app or download Happin App',
+ );
+ const [seo, setSeo] = useState({
+ description: '',
+ keywords: '',
+ title: '',
+ ogImage: '',
+ ogUrl: '',
+ twitterImage: '',
+ });
+
+ useEffect(() => {
+ const acInfo = eventData.event.acInfo;
+ if (acInfo.location !== 'happin.app' && acInfo.eventType !== 'hybrid') {
+ setLocation(acInfo.venueName || acInfo.location);
+ setDescription(
+ ` - You can attend event @ ${acInfo.venueName || acInfo.location}`,
+ );
+ }
+ if (acInfo.eventType === 'hybrid') {
+ setLocation(
+ acInfo.venueName || acInfo.location + ' and Stream Via Happin',
+ );
+ setDescription(
+ ` - You can attend event @ ${
+ acInfo.venueName || acInfo.location
+ } and watch livestream on https://happin.app or download Happin App`,
+ );
+ }
+ }, [eventData.event.acInfo]);
+
+ useEffect(() => {
+ setSeo({
+ description: eventData.event.title + description,
+ keywords: `${eventData.event?.tags.toString()}, Happin livestream`,
+ title: eventData.event.title + ' @ ' + location,
+ ogImage: eventData.event?.socialImg || eventData.event?.cover,
+ ogUrl: `${PRODUCTION_URL}${router.asPath}`,
+ twitterImage: eventData.event?.socialImg || eventData.event?.cover,
+ });
+ }, [location, description, eventData, router.asPath]);
+
+ return (
+
+
+
+
{seo.title}
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default EventSEO;
diff --git a/apps/happin-web/components/page_components/EventPageComponents/EventSection.tsx b/apps/happin-web/components/page_components/EventPageComponents/EventSection.tsx
index 3b3f2e1f..86166757 100644
--- a/apps/happin-web/components/page_components/EventPageComponents/EventSection.tsx
+++ b/apps/happin-web/components/page_components/EventPageComponents/EventSection.tsx
@@ -1,81 +1,83 @@
import React from 'react';
import EventTitle from './EventTitle';
import EventDescription from './EventDescription';
-// import EventLineUp from "./EventLineUp";
import EventHost from './EventHost';
import { EventData } from 'lib/model/event';
import EventAttendees from './EventAttendees';
-import EventGallery from './EventGallery';
-import EventInterested from './EventInterested';
+// import EventGallery from './EventGallery';
+// import EventInterested from './EventInterested';
const EventSection = ({
setIsModalOpen,
eventData,
- groupEvents,
setIsRedeemModalOpen,
setOpenIframe,
canUseIframe,
- setPreventScrolling
+ setPreventScrolling,
}: {
- setIsModalOpen: (arg: boolean) => void,
- eventData: EventData, groupEvents: any,
- setIsRedeemModalOpen: (arg: boolean) => void,
- setPreventScrolling: (arg: any) => void,
- setOpenIframe: (arg: any) => void,
- canUseIframe: boolean,
+ setIsModalOpen: (arg: boolean) => void;
+ eventData: EventData;
+ setIsRedeemModalOpen: (arg: boolean) => void;
+ setPreventScrolling: (arg: any) => void;
+ setOpenIframe: (arg: any) => void;
+ canUseIframe: boolean;
}) => {
//const [firstActive, setFirstActive] = useState(true)
//const [tabCur, setTabCur] = useState(0)
// const [isActive, setActive] = useState(0);
- const galleryOriginalData = [
+ /*const galleryOriginalData = [
{
id: '0',
- src: 'https://images.unsplash.com/photo-1645828694012-307875ab3761?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1645828694012-307875ab3761?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '1',
- src: 'https://images.unsplash.com/photo-1627483297886-49710ae1fc22?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1627483297886-49710ae1fc22?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '2',
- src: 'https://images.unsplash.com/photo-1645839449196-62bde406052e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1645839449196-62bde406052e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '3',
- src: 'https://images.unsplash.com/photo-1645771845014-7077d5d0f058?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1645771845014-7077d5d0f058?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '4',
- src: 'https://images.unsplash.com/photo-1640622659787-d15655c3a2ce?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1640622659787-d15655c3a2ce?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '5',
- src: 'https://images.unsplash.com/photo-1645742175891-9207e6a52e6f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1645742175891-9207e6a52e6f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '6',
- src: 'https://images.unsplash.com/photo-1645810809381-97f6fd2f7d10?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
+ src: 'https://images.unsplash.com/photo-1645810809381-97f6fd2f7d10?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
},
{
id: '7',
- src: 'https://images.unsplash.com/photo-1645542444755-bc554393084a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80'
- }
+ src: 'https://images.unsplash.com/photo-1645542444755-bc554393084a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80',
+ },
];
const interestedList = [
{
_id: '01',
link: '/',
title: 'Willson Fisher: Back to Abnormal World Standup',
- cover: 'https://images.unsplash.com/photo-1645817745517-163a655a0606?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
- avatar: 'https://p6.toutiaoimg.com/origin/tos-cn-i-qvj2lq49k0/54043582bdb04811ae3e4877ab079157?from=pc',
+ cover:
+ 'https://images.unsplash.com/photo-1645817745517-163a655a0606?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
+ avatar:
+ 'https://p6.toutiaoimg.com/origin/tos-cn-i-qvj2lq49k0/54043582bdb04811ae3e4877ab079157?from=pc',
username: 'JeesieJe123',
},
{
_id: '02',
link: '/',
title: 'exposing my family drama ⛄',
- cover: 'https://images.unsplash.com/photo-1645737522838-02ff9b9b39be?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
- avatar: 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
+ cover:
+ 'https://images.unsplash.com/photo-1645737522838-02ff9b9b39be?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
+ avatar:
+ 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
username: 'Shahad',
members: 134,
},
@@ -83,16 +85,20 @@ const EventSection = ({
_id: '03',
link: '/',
title: 'Merry Christmas guys!',
- cover: 'https://images.unsplash.com/photo-1645815431270-7a0f9e676ae2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
- avatar: 'https://p6.toutiaoimg.com/origin/tos-cn-i-qvj2lq49k0/54043582bdb04811ae3e4877ab079157?from=pc',
- username: 'JeesieJe123'
+ cover:
+ 'https://images.unsplash.com/photo-1645815431270-7a0f9e676ae2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
+ avatar:
+ 'https://p6.toutiaoimg.com/origin/tos-cn-i-qvj2lq49k0/54043582bdb04811ae3e4877ab079157?from=pc',
+ username: 'JeesieJe123',
},
{
_id: '04',
link: '/',
title: 'exposing my family drama ⛄',
- cover: 'https://images.unsplash.com/photo-1555918001-e20d10c2bc1c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
- avatar: 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
+ cover:
+ 'https://images.unsplash.com/photo-1555918001-e20d10c2bc1c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
+ avatar:
+ 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
username: 'Shahad',
members: 34,
},
@@ -100,12 +106,14 @@ const EventSection = ({
_id: '05',
link: '/',
title: 'exposing my family drama ⛄',
- cover: 'https://images.unsplash.com/photo-1645810798586-08e892108d67?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
- avatar: 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
+ cover:
+ 'https://images.unsplash.com/photo-1645810798586-08e892108d67?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80',
+ avatar:
+ 'https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/2716efc7e6cb8fa3b28ea4660009aaaa~c5_100x100.webp?x-expires=1640588400&x-signature=KgeyUInhRAcg2BxeLwAjMi2u6oI%3D',
username: 'Shahad',
- members: 26
+ members: 26,
},
- ];
+ ];*/
return (
<>
+ setIsRedeemModalOpen={setIsRedeemModalOpen}
+ />
*/}
- {/* About and Agenda links */}
- {/*
-
- {setActive(0)}}
- to="about"
- //spy={true}
- smooth={true}
- offset={-50}
- duration={500}
- >
- About
-
- {setActive(1)}}
- activeClass="active"
- containerId="scroll-body"
- to="agenda"
- //spy={true}
- smooth={true}
- offset={-50}
- duration={500}
- >
- Agenda
-
-
-
*/}
- {/*
-
{ setTabCur(0) }}>
- About
-
-
{ setTabCur(1) }}>
- Agenda
-
-
*/}
- {/*{tabCur === 0 &&*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/*
*/}
- {/**/}
- {/* */}
- {/*
-
+ {/*
+
*/}
- {/**/}
- {/*}*/}
-
- {/*{tabCur === 1 &&*/}
- {/*
-
-
- */}
- {/*}*/}
+
+ {/*
+
+
*/}
>
);
};
diff --git a/apps/happin-web/components/page_components/LiveStreamComponents/LiveList.tsx b/apps/happin-web/components/page_components/LiveStreamComponents/LiveList.tsx
index f422e144..25f1a2b3 100644
--- a/apps/happin-web/components/page_components/LiveStreamComponents/LiveList.tsx
+++ b/apps/happin-web/components/page_components/LiveStreamComponents/LiveList.tsx
@@ -1,7 +1,7 @@
-import { PlayOne } from '@icon-park/react';
import Link from 'next/link';
import { Avatar } from '@chakra-ui/react';
import React from 'react';
+import IconPark from '@components/IconPark';
export type liveVideo = {
_id: string;
@@ -24,7 +24,7 @@ const LiveList = ({ list } : LiveListProp) => {
diff --git a/apps/happin-web/components/page_components/LiveStreamComponents/Sender.tsx b/apps/happin-web/components/page_components/LiveStreamComponents/Sender.tsx
index 1c8d0e36..aca8ac22 100644
--- a/apps/happin-web/components/page_components/LiveStreamComponents/Sender.tsx
+++ b/apps/happin-web/components/page_components/LiveStreamComponents/Sender.tsx
@@ -1,8 +1,8 @@
-import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
+import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
import classnames from 'classnames';
-import { GrinningFaceWithOpenMouth } from '@icon-park/react';
import { getCaretIndex, getSelection, insertNodeAtCaret, isFirefox, updateCaret } from 'utils/contentEditable';
import SvgIcon from '@components/SvgIcon';
+import IconPark from '@components/IconPark';
type SenderProps = {
placeholder?: string;
@@ -164,7 +164,7 @@ function Sender(props: SenderProps, ref: any) {
className={classnames('livestream__sender-emoji', { 'bg-gray-700': emojiShow, disabled })}
onClick={handlerPressEmoji}
>
-
+
diff --git a/apps/happin-web/components/page_components/MyEventDetailsPageComponents/MyEventDetailsHead.tsx b/apps/happin-web/components/page_components/MyEventDetailsPageComponents/MyEventDetailsHead.tsx
index e8fb6249..bb3281e2 100644
--- a/apps/happin-web/components/page_components/MyEventDetailsPageComponents/MyEventDetailsHead.tsx
+++ b/apps/happin-web/components/page_components/MyEventDetailsPageComponents/MyEventDetailsHead.tsx
@@ -1,7 +1,7 @@
-import { Left } from '@icon-park/react';
import Link from 'next/link';
import React from 'react';
import {EventDetail} from '../../../lib/model/event';
+import IconPark from '@components/IconPark';
export type MyEventDetailsProp = {
eventDetail:EventDetail;
@@ -27,7 +27,7 @@ const MyEventDetailsHead = ({eventDetail}:MyEventDetailsProp) => {
-
+
{/* Back */}
diff --git a/apps/happin-web/components/page_components/PaymentPageComponents/PaymentHead.tsx b/apps/happin-web/components/page_components/PaymentPageComponents/PaymentHead.tsx
index 98029910..e4696737 100644
--- a/apps/happin-web/components/page_components/PaymentPageComponents/PaymentHead.tsx
+++ b/apps/happin-web/components/page_components/PaymentPageComponents/PaymentHead.tsx
@@ -2,8 +2,8 @@ import { useCheckoutState } from 'contexts/checkout-state';
import moment from 'moment';
import React, { useEffect, useState } from 'react';
import Countdown, { zeroPad } from 'react-countdown';
-import { Left } from '@icon-park/react';
import { useRouter } from 'next/router';
+import IconPark from '@components/IconPark';
const PaymentHead = ({ countdownCompleted }:{ countdownCompleted: (arg:any) => void }
@@ -29,7 +29,7 @@ const PaymentHead = ({ countdownCompleted }:{ countdownCompleted: (arg:any) => v
{router.back()}} className="btn inline-flex items-center text-gray-300 hover:text-gray-50 !px-0 mr-5 md:mr-7">
-
+
{/* Back */}
diff --git a/apps/happin-web/components/page_components/SubmitEventPageComponents/ThirdPartyEvent.tsx b/apps/happin-web/components/page_components/SubmitEventPageComponents/ThirdPartyEvent.tsx
index 807d8471..41d2b5ea 100644
--- a/apps/happin-web/components/page_components/SubmitEventPageComponents/ThirdPartyEvent.tsx
+++ b/apps/happin-web/components/page_components/SubmitEventPageComponents/ThirdPartyEvent.tsx
@@ -1,5 +1,4 @@
import React, { useState } from "react";
-import { Left } from '@icon-park/react';
import { Controller, useForm } from "react-hook-form";
import { Button, Spinner, useToast } from '@chakra-ui/react';
import { useEffect } from "react";
@@ -12,6 +11,7 @@ import Upload from "rc-upload"
import { IThirdPartyEvent } from "pages/submit-event";
import { useRouter } from "next/router";
import GooglePlacesAutocomplete, { geocodeByPlaceId } from 'react-google-places-autocomplete';
+import IconPark from '@components/IconPark';
type selectOption = {
label: string;
@@ -205,7 +205,7 @@ export default function ThirdPartyEvent({
setThirdPartyReadOnlyProps(undefined);
}}
className="btn inline-flex items-center text-gray-300 hover:text-gray-50 !px-0 mr-5 md:mr-7">
-
+
Share third party event
diff --git a/apps/happin-web/components/reusable/Modal.tsx b/apps/happin-web/components/reusable/Modal.tsx
index 5421305b..a9fd352a 100644
--- a/apps/happin-web/components/reusable/Modal.tsx
+++ b/apps/happin-web/components/reusable/Modal.tsx
@@ -1,8 +1,8 @@
import React, { Fragment, ReactNode, useRef } from 'react';
-import { CloseSmall } from '@icon-park/react';
import classNames from 'classnames';
import { Dialog, Transition } from '@headlessui/react';
import classnames from 'classnames';
+import IconPark from '@components/IconPark';
export type ModalProps = {
isOpen: boolean;
@@ -91,7 +91,7 @@ const Modal = (props: ModalProps) => {
setIsOpen(false);
onClose && onClose();
}}>
-
+
)
diff --git a/apps/happin-web/components/reusable/NumberInput.tsx b/apps/happin-web/components/reusable/NumberInput.tsx
index 2eb1765c..cc592b29 100644
--- a/apps/happin-web/components/reusable/NumberInput.tsx
+++ b/apps/happin-web/components/reusable/NumberInput.tsx
@@ -1,7 +1,7 @@
import { useNumberInput, UseNumberInputProps } from '@chakra-ui/react';
-import { Minus, Plus } from '@icon-park/react';
import React from 'react';
import classNames from 'classnames';
+import IconPark from '@components/IconPark';
export type NumberInputProps = {
isDisabled?: boolean;
@@ -34,10 +34,10 @@ const NumberInput = ({ isDisabled, size, max, min, onDecreaseClick, onIncreaseCl
return (
-
+
-
+
{/* always not allow enter number */}
diff --git a/apps/happin-web/components/reusable/PopUpModal.tsx b/apps/happin-web/components/reusable/PopUpModal.tsx
index 6a64b831..6ca6485b 100644
--- a/apps/happin-web/components/reusable/PopUpModal.tsx
+++ b/apps/happin-web/components/reusable/PopUpModal.tsx
@@ -1,5 +1,5 @@
-import { CloseSmall } from '@icon-park/react';
import React from 'react';
+import IconPark from '@components/IconPark';
const PopUpModal = ({ modalTitle, setIsModalOpen, children, closeableOutside=true, showCloseIcon=true, mobilePosition='bottom'}: any) => {
return (
@@ -16,7 +16,7 @@ const PopUpModal = ({ modalTitle, setIsModalOpen, children, closeableOutside=tru
{
setIsModalOpen(false)
}}>
-
+
}
diff --git a/apps/happin-web/components/reusable/Select.tsx b/apps/happin-web/components/reusable/Select.tsx
index a19d8ef9..617b8840 100644
--- a/apps/happin-web/components/reusable/Select.tsx
+++ b/apps/happin-web/components/reusable/Select.tsx
@@ -1,7 +1,7 @@
import React, { Fragment, useEffect, useRef, useState } from 'react';
import { Listbox, Transition } from '@headlessui/react'
-import { Down } from '@icon-park/react';
import classNames from 'classnames';
+import IconPark from '@components/IconPark';
type SelectProps = {
data: SelectItemProps[];
@@ -48,7 +48,7 @@ export default function Select(props: SelectProps) {
{selected.label}
-
+
void;
+ className?: string;
+}
+
+const initialOptions: VideoJsPlayerOptions = {
+ controls: true,
+ fluid: true,
+ controlBar: {
+ volumePanel: {
+ inline: false,
+ },
+ },
+};
+
+const VideoPlayer: React.FC = ({ options, onReady, className }) => {
+ // const videoNode = React.useRef(null);
+ // const player = React.useRef();
+
+ const videoRef = React.useRef(null);
+ const playerRef = React.useRef(null);
+
+ React.useEffect(() => {
+ // make sure Video.js player is only initialized once
+ if (!playerRef.current) {
+ const videoElement = videoRef.current;
+ if (!videoElement) return;
+
+ const player = playerRef.current = videojs(videoElement, options, () => {
+ console.log("player is ready");
+ onReady?.(player);
+ });
+ } else {
+ const player = playerRef.current;
+ onReady?.(player);
+ // you can update player here [update player through props]
+ // const player = playerRef.current;
+ // player.autoplay(options.autoplay);
+ // player.src(options.sources);
+ }
+ }, [options, videoRef]);
+ React.useEffect(() => {
+ const player = playerRef.current;
+
+ return () => {
+ if (player) {
+ player.dispose();
+ playerRef.current = null;
+ }
+ };
+ }, [playerRef]);
+ return (
+
+
+
+ );
+};
+
+export default VideoPlayer;
diff --git a/apps/happin-web/lib/api/tickets.ts b/apps/happin-web/lib/api/tickets.ts
index 0ac72978..42c69a5d 100644
--- a/apps/happin-web/lib/api/tickets.ts
+++ b/apps/happin-web/lib/api/tickets.ts
@@ -3,7 +3,7 @@ import { getFromHappin, getFromCrowdCore, postToHappin, postToCrowdCore, deleteF
const CHECKIN_TICKET_PATH = '/ticket/check-in';
const GET_GA_TICKET_PATH = '/v2/tickets/general-admission?acid={acid}'
-const GET_MERCH_PATH = '/v2/merchandise?withActivities=true&source=sass&activityId={acid}'
+const GET_MERCH_PATH = '/box?withActivities=true&source=sass&activityId={acid}'
const VALIADTE_CODE_PATH = '/codes/validate?activityId={acid}&code={code}'
const LOCK_CHECKOUT_PATH = '/payment/order'
const RELEASE_LOCK_CHECKOUT_PATH = '/payment/order/{orderId}'
diff --git a/apps/happin-web/netlify.toml b/apps/happin-web/netlify.toml
index 144b4e7f..dc15f795 100644
--- a/apps/happin-web/netlify.toml
+++ b/apps/happin-web/netlify.toml
@@ -1,11 +1,12 @@
[build]
command = "yarn build"
- publish = "out"
+ publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"
[context.deploy-preview.environment]
+ NODE_VERSION="12.22.0"
NEXT_PUBLIC_HAPPIN_SERVER_HOST="https://api.happin.app/prod"
NEXT_PUBLIC_CROWD_CORE_HOST="https://api.crowdcore.com/prod"
NEXT_PUBLIC_HAPPIN_SSO="https://sso.happin.app"
diff --git a/apps/happin-web/next-env.d.ts b/apps/happin-web/next-env.d.ts
index c6643fda..4f11a03d 100644
--- a/apps/happin-web/next-env.d.ts
+++ b/apps/happin-web/next-env.d.ts
@@ -1,3 +1,5 @@
///
-///
///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/apps/happin-web/next.config.js b/apps/happin-web/next.config.js
index 8c613111..aa839d8b 100644
--- a/apps/happin-web/next.config.js
+++ b/apps/happin-web/next.config.js
@@ -1,4 +1,4 @@
module.exports = {
- target: 'serverless',
- webpack5: true,
+ // target: 'serverless',
+ generateBuildId: () => 'build'
}
diff --git a/apps/happin-web/package.json b/apps/happin-web/package.json
index 2438a931..9afd1b16 100644
--- a/apps/happin-web/package.json
+++ b/apps/happin-web/package.json
@@ -14,7 +14,6 @@
"@emotion/react": "^11.1.1",
"@emotion/styled": "^11",
"@headlessui/react": "^1.5.0",
- "@icon-park/react": "^1.3.5",
"@stripe/react-stripe-js": "^1.4.1",
"@stripe/stripe-js": "^1.17.1",
"@tailwindcss/aspect-ratio": "^0.4.0",
@@ -28,7 +27,7 @@
"lodash": "^4.17.21",
"moment": "^2.29.1",
"moment-timezone": "^0.5.33",
- "next": "11.0.1",
+ "next": "12",
"randomcolor": "^0.6.2",
"rc-upload": "^4.3.3",
"react": "17.0.2",
@@ -54,9 +53,11 @@
"react-spring-lightbox": "^1.6.0",
"sass": "^1.35.1",
"styled-components": "^5.3.0",
- "tim-js-sdk": "^2.15.0"
+ "tim-js-sdk": "^2.15.0",
+ "video.js": "^7.20.3"
},
"devDependencies": {
+ "@netlify/plugin-nextjs": "^4.29.2",
"@types/emoji-mart": "^3.0.8",
"@types/lodash": "^4.14.172",
"@types/react": "17.0.11",
@@ -65,13 +66,14 @@
"@types/react-scroll": "^1.8.3",
"@types/react-select-country-list": "^2.2.0",
"@types/react-slick": "^0.23.5",
- "autoprefixer": "^10.4.2",
+ "@types/video.js": "^7.3.49",
+ "autoprefixer": "10.4.5",
"eslint": "7.29.0",
"eslint-config-next": "11.0.1",
"eslint-config-prettier": "^8.5.0",
- "postcss": "^8.4.6",
- "postcss-nested": "^5.0.6",
- "tailwindcss": "^3.0.23",
+ "postcss": "^8.4.19",
+ "postcss-nested": "^6.0.0",
+ "tailwindcss": "^3.2.4",
"typescript": "4.3.5"
}
}
diff --git a/apps/happin-web/pages/appreward/index.tsx b/apps/happin-web/pages/appreward/index.tsx
index 3ec03d5f..c103dd8b 100644
--- a/apps/happin-web/pages/appreward/index.tsx
+++ b/apps/happin-web/pages/appreward/index.tsx
@@ -1,6 +1,5 @@
import React, { useState, useEffect } from 'react';
import { useToast } from '@chakra-ui/react';
-import { ArrowRight, Help, Switch } from "@icon-park/react";
import classnames from "classnames";
import SvgIcon from "@components/SvgIcon";
import { generateToast } from '@components/page_components/CheckoutPageComponents/util/toast';
@@ -11,6 +10,7 @@ import { useSSOState } from 'contexts/sso-state';
import { useRouter } from 'next/router';
import jwt_decode from "jwt-decode";
import { getUserInfo } from 'lib/api';
+import IconPark from '@components/IconPark';
const Reward = () => {
const router = useRouter()
@@ -21,9 +21,9 @@ const Reward = () => {
const [ balance, setBalance ] = useState({"coins": 0, "diamonds": 0,});
const [ happinID, setHappinID ] = useState('');
const [ dailyCheckIn, setDailyCheckIn ] = useState({"reward":0, "rewardType": "", "strike":0, "hasCheckedIn":false})
- const [ oneTimeTask, setOneTimeTask ] = useState([])
+ const [ oneTimeTask, setOneTimeTask ] = useState([])
const [ inProgress, setInProgress ] = useState(false);
- const [ semiMonthlyTask, setSemiMonthlyTask ] = useState([])
+ const [ semiMonthlyTask, setSemiMonthlyTask ] = useState([])
const [ repeatTask, setRepeatTask ] = useState([]);
const toast = useToast();
const tab = ['Earn', 'Redeem']
@@ -42,7 +42,7 @@ const Reward = () => {
if (res.data.tasks.repeat) {
setRepeatTask(res.data.tasks.repeat);
}
-
+
// if (res.data.tasks.weekly) {
// setWeeklyTask(res.data.tasks.weekly);
// }
@@ -66,7 +66,7 @@ const Reward = () => {
temp.strike = temp.strike + 1;
temp.hasCheckedIn = true;
setDailyCheckIn(temp)
-
+
}
}
@@ -107,7 +107,7 @@ const Reward = () => {
setSemiMonthlyTask(update);
}
}
-
+
// update balance:
try {
const res: RewardListResponse = await getRewards();
@@ -176,7 +176,7 @@ const Reward = () => {
generateToast('Get reward error', toast);
console.log('Get reward error: ', error)
}
-
+
})()
}
},[user])
@@ -211,7 +211,7 @@ const Reward = () => {
generateToast('Get reward error', toast);
console.log('Get reward error: ', error)
}
-
+
})()
console.log(user);
}
@@ -236,11 +236,11 @@ const Reward = () => {
Current Balance
-
+
handleSendToAPP("topup")}>Top Up Now
-
+
@@ -257,7 +257,7 @@ const Reward = () => {
-
+
{balance.diamonds}
@@ -305,12 +305,12 @@ const Reward = () => {
-
Earn {task.rewardAmount}
+
Earn {task.rewardAmount}
{task.description}
- { task.claimed ?
+ { task.claimed ?
Claimed
:
handleClaim(task._id, "oneTime")}>Claim
}
@@ -371,7 +371,7 @@ const Reward = () => {
{task.rewardAmount}
- { task.claimable ?
+ { task.claimable ?
Enter
: task.claimed &&
Claimed
}
@@ -393,7 +393,7 @@ const Reward = () => {
{task.rewardAmount}
- { task.claimed ?
+ { task.claimed ?
Claimed
:
handleClaim(task._id, "oneTime")}>Enter
}
@@ -451,4 +451,4 @@ const Reward = () => {
}
-export default Reward;
\ No newline at end of file
+export default Reward;
diff --git a/apps/happin-web/pages/campaign/index.tsx b/apps/happin-web/pages/campaign/index.tsx
index 6e25d84a..6a2966f4 100644
--- a/apps/happin-web/pages/campaign/index.tsx
+++ b/apps/happin-web/pages/campaign/index.tsx
@@ -1,10 +1,10 @@
import React, { useState } from 'react';
-import { ArrowRight, Help, Lightning, Like, Stopwatch, Switch } from '@icon-park/react';
import classnames from "classnames";
import SvgIcon from "@components/SvgIcon";
import { SearchIcon } from '@chakra-ui/icons';
import { Avatar } from '@chakra-ui/react';
import Countdown, { zeroPad } from 'react-countdown';
+import IconPark from '@components/IconPark';
const Campaign = () => {
@@ -101,7 +101,7 @@ const Campaign = () => {
About This Campaign
-
+
Days Left
{/* */}
@@ -160,7 +160,7 @@ const Campaign = () => {
-
+
Visit Gleam on Facebook
@@ -173,7 +173,7 @@ const Campaign = () => {
-
+
Submit a Selfie
diff --git a/apps/happin-web/pages/checkout/[event_id].tsx b/apps/happin-web/pages/checkout/[event_id].tsx
index 083a8795..e787e3af 100644
--- a/apps/happin-web/pages/checkout/[event_id].tsx
+++ b/apps/happin-web/pages/checkout/[event_id].tsx
@@ -247,10 +247,18 @@ const Checkout = () => {
let merchList: MerchItemDataProps[] = []
if (res.length) {
merchList = res.map((m: any) => {
- const property: MerchProperty[] = m.properties.map((p: any) => ({
- ...p,
- originalPValue: p.pValue
- }))
+
+ // 我们没有了m.properties 所以我们造一个。
+ const property: MerchProperty[] = [{
+ pName: 'Default', //代表默认属性
+ pValue: m.quantity, //这个是我们新增加的quantity
+ originalPValue: m.quantity,
+ }];
+
+ // const property: MerchProperty[] = m.properties.map((p: any) => ({
+ // ...p,
+ // originalPValue: p.pValue
+ // }))
// if this merch's price is greater than 0, it's not considered to be
// a bundle merch, but a regular merch binded to a ticket as optional item
const bindTickets = m.activities.filter((a: any) => eventId === a.activityId)
@@ -259,15 +267,15 @@ const Checkout = () => {
id: m._id,
image: m.image,
name: m.name,
- max: m.max,
- forApp: m.forApp,
+ // max: m.max, // 返回没有了所以去掉
+ // forApp: m.forApp,
description: m.description,
shippingCountry: m.shippingCost.map((shipping: any) => shipping.destination),
price: m.price,
kind: 'merch',
mail: m.mail,
- show: m.show,
- isDonation: m.isDonation,
+ show: !m.deleted,
+ isDonation: false,
property,
isOptionalBundleItem: (m.price > 0 && bindTickets[0].length),
tickets: bindTickets[0] || []
diff --git a/apps/happin-web/pages/checkout/payment/index.tsx b/apps/happin-web/pages/checkout/payment/index.tsx
index 7b5b8bd3..56a26d8b 100644
--- a/apps/happin-web/pages/checkout/payment/index.tsx
+++ b/apps/happin-web/pages/checkout/payment/index.tsx
@@ -9,7 +9,6 @@ import {
useElements,
useStripe
} from "@stripe/react-stripe-js";
-import { Delete } from '@icon-park/react';
import { Checkbox, HStack } from '@chakra-ui/react';
import { useEffect } from 'react';
import { useCheckoutState } from 'contexts/checkout-state';
@@ -28,6 +27,7 @@ import { PayPalButton } from "react-paypal-button-v2";
import _ from "lodash";
import { loadStripe, StripeCardElement } from '@stripe/stripe-js';
import { useUserState } from 'contexts/user-state';
+import IconPark from '@components/IconPark';
enum EOrderStatus {
@@ -1189,7 +1189,7 @@ const PaymentInner = (props: any) => {
{ deleteTicketFromCart(getEdtingTicketListItem(t), t.quantity, dispatchTicketListAction, removeItem) }}
className="relative flex items-center justify-center w-8 h-8 text-gray-400 rounded-full cursor-pointer bg-gray-800 hover:bg-gray-700 hover:text-gray-50 transition">
-
+
@@ -1220,7 +1220,7 @@ const PaymentInner = (props: any) => {
{ deleteMerchFromCart(getEditingMerchListItem(m), m.quantity, m.property, dispatchMerchListAction, removeItem) }}
className="relative flex items-center justify-center w-8 h-8 text-gray-400 rounded-full cursor-pointer bg-gray-800 hover:bg-gray-700 hover:text-gray-50 transition">
-
+
@@ -1250,7 +1250,7 @@ const PaymentInner = (props: any) => {
{ bundleDeleteHandler(t) }}
className="relative flex items-center justify-center w-8 h-8 text-gray-400 rounded-full cursor-pointer bg-gray-800 hover:bg-gray-700 hover:text-gray-50 transition">
-
+
diff --git a/apps/happin-web/pages/index.tsx b/apps/happin-web/pages/index.tsx
index f8779997..9b93a09c 100644
--- a/apps/happin-web/pages/index.tsx
+++ b/apps/happin-web/pages/index.tsx
@@ -1,275 +1,363 @@
-import React, { Fragment, useRef, useState } from 'react';
-import Link from 'next/link';
-import { SwitchTransition, CSSTransition } from 'react-transition-group';
-import classNames from "classnames";
-import { Stack } from '@chakra-ui/react';
-import { Dialog, Transition } from '@headlessui/react';
-import { CloseSmall } from '@icon-park/react';
-import { GetServerSidePropsResult } from 'next';
-import { getWhiteLabelDomain } from 'lib/api';
-import { useRouter } from 'next/router';
+import React, { useState } from 'react';
import { useEffect } from 'react';
-import { useUserState } from 'contexts/user-state';
+import VideoPlayer from '@components/reusable/Video';
+import { VideoJsPlayer } from 'video.js';
+import IconPark from '@components/IconPark';
+import Link from 'next/link';
-const imageList = [
- {
- firstImg: '/images/HappininInitial1.png',
- secImg: '/images/Happininfriendcreateideawithevent.png',
- },
- {
- firstImg: '/images/Createhangoutideasfilled.png',
- secImg: '/images/EventwithTickets.png',
- },
- {
- firstImg: '/images/BeforeMatch.png',
- secImg: '/images/Match.png',
- },
- {
- firstImg: '/images/ProfilePasthangout.png',
- secImg: '/images/PrivateGroupChat.png',
- },
-];
-const buildEvent = [
- {
- title: 'Group matching',
- desc: 'Match with up to 5 people at a time based on similar interest hashtags, events you are going to, and opinions on fun, random questions!'
- },
- {
- title: 'Gathering',
- desc: 'GEN-Z version of meetups, virtually or in real life.'
- },
- {
- title: 'Discover',
- desc: 'Discover public events in your area, and other potential hashtags that you want to group match with.'
- },
- {
- title: 'Profile & Content Visibility',
- desc: 'Upload your media to different hashtags. You can add photos and videos to different hashtags, so only people who share the same interests can see it, even your friends!'
- },
-];
export default function Home() {
- const router = useRouter();
- const [isOpen, setIsOpen] = useState(false)
- const [buildCur, setBuildCur] = useState
(0);
- const { clearUser } = useUserState();
- const closeModal = () => {
- setIsOpen(false)
- }
- const openModal = () => {
- setIsOpen(true)
- }
-
+ const playerRef = React.useRef(null);
+ const [isPlay, setIsPlay] = useState(false);
+ const [bannerShow, setBannerShow] = useState(true);
useEffect(() => {
- if (router.query.logout) {
- clearUser();
- router.push('/');
- }
- },[router])
-
- const focusRef = useRef(null);
-
+ document.body.classList.add('home__page');
+ return () => {
+ document.body.classList.remove('home__page');
+ };
+ }, []);
+ const handleVideo = () => {
+ setIsPlay(true);
+ playerRef.current?.play();
+ playerRef.current?.loop(true);
+ };
+ const handlePlayerReady = (player: VideoJsPlayer) => {
+ playerRef.current = player;
+ };
return (
-
-
-
-
-

-

-
-

-

-
-
-
-
+
+
+
+
+ Send AR stickers to friends while chatting.
+
+
+ Create meaningful interactions and self-express.
+
+
+
+ Get early access
+
+
+ Join as 3d designer
+
-
-
-
-
-

- It’s time for you to join the party!
+
+
+
+
+
+
+
+ {!isPlay && (
+
+ )}
+
+
-
-
-
-
-
-
- Group matching platform for new friends
+
+
+
+
+
+ Match with other cool people
+
+
+ Never get bored to connect with other people in your school,
+ your community and more.
+
-
-
-
-
- Happin is the BEST and newest way to join in on the fun. Match with up to 5 people at a time, chat with like-minded individuals, and discover the latest gatherings in your area. The party won’t start without you! Download the Happin app today!
-
- {/*
*/}
+
+

+
+
+
+
+
+
+
+
+
+ Turn the background of messaging into an AR camera
-
-
-
-
-
-
-
-
+
+ So you can see 3d stickers in real world while chatting with
+ your friends.
+
+
+
+
+
+
+
+
+
+

+
-
-
-
-
- How Happin Works
-
+
+
+
+
+
+ Build-in editing tool for you to create more personal stickers.
+
+
+ You can add custom text, voice, music, or effects.
+
+
+
+
+
+
+
+
+
+
+

+
+
+
-
-
-
- {buildEvent.map((item, index) => (
- {
- setBuildCur(index);
- }}
- >
-
{item.title}
-
{item.desc}
+
+
+
+
+
+
+
+ Access to private 3d space from anywhere when you chat with your
+ friends.
+
+
+
+
+
+
+
+
+
+
+
- ))}
-
+
- {/*
*/}
- {/*
*/}
- {/* {*/}
- {/* node.addEventListener('transitionend', done, false);*/}
- {/* }}*/}
- {/* classNames="home__fade"*/}
- {/* >*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
![{buildEvent[buildCur].title}]({imageList[buildCur].firstImg})
*/}
- {/*
*/}
- {/*
*/}
- {/*
![{buildEvent[buildCur].title}]({imageList[buildCur].secImg})
*/}
- {/*
*/}
- {/*
*/}
- {/* /!*
*!/*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*Dialog*/}
-
-