feat: embed demo video to create public profile

This commit is contained in:
RaktimaNXG
2024-09-02 21:01:44 +05:30
parent 8a31b008d2
commit 99ec772d64
2 changed files with 21 additions and 10 deletions
+3 -5
View File
@@ -73,14 +73,14 @@ function UserProfile() {
getUserDetail();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const getUserDetail = async () => {
setIsLoader(true);
const extClass = localStorage.getItem("Extand_Class");
const jsonSender = JSON.parse(extClass);
const tourstatuss = jsonSender[0]?.TourStatus && jsonSender[0].TourStatus;
if (tourstatuss && tourstatuss.length > 0) {
if (!isEnableSubscription) {
setIsProfileTour(true);
} else if (tourstatuss && tourstatuss.length > 0) {
setTourStatus(tourstatuss);
const checkTourRecipients = tourstatuss.filter(
(data) => data.profileTour
@@ -88,8 +88,6 @@ function UserProfile() {
if (checkTourRecipients && checkTourRecipients.length > 0) {
setIsProfileTour(checkTourRecipients[0]?.profileTour);
}
} else {
setIsProfileTour(false);
}
const HeaderDocId = jsonSender[0]?.HeaderDocId;
if (isEnableSubscription) {
@@ -24,11 +24,24 @@ export default function TourContentWithBtn({
</div>
)}
{video && (
<div className="flex items-center justify-center my-[10px] border-[1px] border-gray-400 rounded-sm">
<video autoPlay loop muted playsInline>
<source className="w-[100%]" src={video} type="video/mp4" />
</video>
</div>
<>
<a
className="cursor-pointer underline text-blue-700"
target="_blank"
rel="noreferrer"
href="https://www.youtube.com/embed/aGjaMfm7Gqo?si=2Ul0nUlFovlVoZ1U"
>
Open in new tab
</a>
<div className="flex items-center justify-center my-[10px] border-[1px] border-gray-400 rounded-sm">
<iframe
src="https://www.youtube.com/embed/aGjaMfm7Gqo?si=2Ul0nUlFovlVoZ1U"
title="YouTube video player"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
></iframe>
</div>
</>
)}
<label className="flex items-center justify-center mb-0">