Skip to content

Commit d0da87f

Browse files
committed
Added Blur in company name
1 parent 80e3c67 commit d0da87f

File tree

5 files changed

+75
-46
lines changed

5 files changed

+75
-46
lines changed

src/app/pricing/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const metadata: Metadata = {
2424
},
2525
};
2626

27+
28+
2729
export default function PricingPage() {
2830
return (
2931
<>

src/components/BillingCard/billing-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export default function PricingAccordion({setActiveView}:PricingAccordion) {
194194
currency: orderData.currency,
195195
name: "Hustloop",
196196
description: `Subscription: ${plan.name}`,
197-
image: "/logo.png",
197+
image: "/hustloop_logo.png",
198198
order_id: orderData.order_id,
199199
handler: async function (response: any) {
200200
try {

src/components/views/CorporateChallengeCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export const CorporateChallengeCard = ({
6767
{challenge.title}
6868
</CardTitle>
6969

70-
<CardDescription>
71-
{challenge.company_name ? challenge.company_name.replace(/x/gi, '█') : ''}
70+
<CardDescription className="blur-sm">
71+
{challenge.company_name || ''}
7272
</CardDescription>
7373

7474
<Badge variant={isClosed ? "destructive" : "secondary"} className="line-clamp-1 w-[50%] mt-1">

src/components/views/corporate-challenge-details.tsx

Lines changed: 69 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import {
7070
import { toast } from '@/hooks/use-toast';
7171
import { string } from 'zod';
7272
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
73+
import { useRouter } from 'next/navigation';
7374

7475
interface CorporateChallengeDetailsProps {
7576
challenge: CorporateChallenge | null;
@@ -221,7 +222,7 @@ export default function CorporateChallengeDetails({
221222
const [deleteAnnouncementId, setDeleteAnnouncementId] = useState<string | null>(null);
222223
const [isFetchingAnnouncements, setIsFetchingAnnouncements] = useState(false);
223224
const [hasAgreed, setHasAgreed] = useState(false);
224-
225+
const router = useRouter();
225226
const handleScrollCapture = (e: React.UIEvent<HTMLDivElement>) => {
226227
const el = e.currentTarget;
227228
setScrolled(el.scrollTop > 0);
@@ -407,11 +408,11 @@ export default function CorporateChallengeDetails({
407408
let tooltipContent = null;
408409
if (!isLoggedIn) {
409410
tooltipContent = <p>Please login to view the problem statement&apos;s</p>;
410-
} //else if (!hasSubscription) {
411-
// tooltipContent = (
412-
// <p>Subscribe to a plan to view and submit the solution</p>
413-
// );
414-
else if (isOtherUsers) {
411+
} else if (!hasSubscription) {
412+
tooltipContent = (
413+
<p>Subscribe to a plan to view and submit the solution</p>
414+
);
415+
} else if (isOtherUsers) {
415416
tooltipContent = (
416417
<p>{"Solution submission is not allowed for your role."}</p>
417418
)
@@ -471,13 +472,25 @@ export default function CorporateChallengeDetails({
471472
<div>
472473

473474
<DialogTitle className="text-3xl font-bold font-headline text-left">
474-
{challenge.company_name ? <span className='text-black'>{challenge.company_name.replace(/x/gi, '█')}</span> : ''}
475+
{challenge.company_name ? (
476+
<span className="text-black blur-sm">{challenge.company_name}</span>
477+
) : ''}
475478
</DialogTitle>
476479
<div className="text-left flex flex-col gap-2">
477480
<DialogDescription className="line-clamp-3">
478481
{challenge.company_description}
479482
</DialogDescription>
480-
<p className="text-sm text-muted-foreground">A challenge by {challenge.company_name ? challenge.company_name.replace(/x/gi, '█') : ''} {challenge.affiliated_by && <span className="text-muted-foreground font-bold font-headline">(Affiliated By {challenge.affiliated_by})</span>}</p>
483+
<p className="text-sm text-muted-foreground">
484+
A challenge by{' '}
485+
{challenge.company_name ? (
486+
<span className="blur-sm">{challenge.company_name}</span>
487+
) : ''}{' '}
488+
{challenge.affiliated_by && (
489+
<span className="text-muted-foreground font-bold font-headline">
490+
(Affiliated By {challenge.affiliated_by})
491+
</span>
492+
)}
493+
</p>
481494
</div>
482495
</div>
483496
</div>
@@ -870,46 +883,59 @@ export default function CorporateChallengeDetails({
870883
<TooltipProvider>
871884
<Tooltip>
872885
<TooltipTrigger asChild>
873-
{isChallengeExpiredOrStopped ? (
874-
<div />
875-
) : isOtherUsers ? (
876-
<div className="flex gap-4 w-full justify-center">
877-
<Button disabled className="bg-gray-400 cursor-not-allowed">
878-
Not Allowed
879-
</Button>
880-
</div>
881-
) : isAllowedFounder || isLoggedIn ? (
882-
<Button
883-
size="lg"
884-
className="bg-accent hover:bg-accent/90 text-accent-foreground"
885-
onClick={() => {
886-
if (hasAgreed) {
887-
setShowSubmissionForm(true);
888-
} else {
889-
setShowTermsDialog(true);
890-
}
891-
handleApplyClick(challenge.id)
892-
}}
893-
disabled={isDisabled || isSolutionSubmitted}
894-
>
895-
<Rocket className="mr-2 h-5 w-5" />
896-
{isSolutionSubmitted ? "Solution Submitted" : "Solve This Challenge"}
897-
</Button>
898-
) : (
899-
<div className="flex gap-4 w-full justify-center mt-4">
900-
<Button onClick={() => setActiveView("login")}>Login</Button>
901-
886+
<div className="inline-block">
887+
{isChallengeExpiredOrStopped ? (
888+
<div />
889+
) : isOtherUsers ? (
890+
<div className="flex gap-4 w-full justify-center">
891+
<Button disabled className="bg-gray-400 cursor-not-allowed">
892+
Not Allowed
893+
</Button>
894+
</div>
895+
) : isAllowedFounder || isLoggedIn ? (
902896
<Button
903-
onClick={() => setActiveView("signup")}
897+
size="lg"
904898
className="bg-accent hover:bg-accent/90 text-accent-foreground"
899+
onClick={() => {
900+
if (!hasSubscription) {
901+
toast({
902+
title: "Subscription Required",
903+
description: "Please subscribe to a plan to access this challenge",
904+
variant: "default",
905+
});
906+
router.push('/pricing');
907+
return;
908+
}
909+
if (hasAgreed) {
910+
setShowSubmissionForm(true);
911+
} else {
912+
setShowTermsDialog(true);
913+
}
914+
handleApplyClick(challenge.id)
915+
}}
916+
disabled={isDisabled || isSolutionSubmitted}
905917
>
906-
Sign Up
918+
<Rocket className="mr-2 h-5 w-5" />
919+
{isSolutionSubmitted ? "Solution Submitted" : "Solve This Challenge"}
907920
</Button>
908-
</div>
909-
)}
921+
) : (
922+
<div className="flex gap-4 w-full justify-center mt-4">
923+
<Button onClick={() => setActiveView("login")}>Login</Button>
924+
<Button
925+
onClick={() => setActiveView("signup")}
926+
className="bg-accent hover:bg-accent/90 text-accent-foreground"
927+
>
928+
Sign Up
929+
</Button>
930+
</div>
931+
)}
932+
</div>
910933
</TooltipTrigger>
911-
912-
{isDisabled && <TooltipContent>{tooltipContent}</TooltipContent>}
934+
{isDisabled && !isChallengeExpiredOrStopped && (
935+
<TooltipContent side="top" align="center">
936+
{tooltipContent}
937+
</TooltipContent>
938+
)}
913939
</Tooltip>
914940
</TooltipProvider>
915941

src/components/views/main-view.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import BrowseMSME from "./browseMSME";
2222
import SolveChallengeDashboard from "./solve-challenge-dashboard";
2323
import ListTechnologyDashboard from "./list-a-tech-dashboard";
2424
import InnovativeIdeaDashboard from "./innovative-dashboard";
25+
import PricingPageClient from "@/app/pricing/pricing-client";
2526

2627

2728
const ModalSkeleton = () => (

0 commit comments

Comments
 (0)