Skip to content
Merged

Main #380

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/app/(protected)/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
useCreateAppleWalletPass,
} from "@/lib/api/wallet/hook";
import { useAllTeams } from "@/lib/api/team";
import { useFlagState } from "@/lib/api/flag/hook";
import Image from "next/image";
import QRCode from "react-qr-code";
import { Button } from "@/components/ui/button";
Expand Down Expand Up @@ -55,6 +56,9 @@ export default function Profile() {

const [showQRCode, setShowQRCode] = useState(false);

// Feature flag check for HelpDesk
const { data: helpDeskFlag } = useFlagState("HelpDesk");

const toggleQRCode = () => setShowQRCode((prev) => !prev);

useEffect(() => {
Expand Down Expand Up @@ -447,15 +451,17 @@ export default function Profile() {
Manage Extra Credit
</Button>

<Button
onClick={() => window.open("https://qstack.hackpsu.org", "_blank")}
className="w-full"
variant="default"
size="lg"
>
<HelpCircle className="mr-2 h-4 w-4" />
Get Help / Submit a Ticket
</Button>
{helpDeskFlag?.isEnabled && (
<Button
onClick={() => window.open("https://qstack.hackpsu.org", "_blank")}
className="w-full"
variant="default"
size="lg"
>
<HelpCircle className="mr-2 h-4 w-4" />
Get Help / Submit a Ticket
</Button>
)}

<Separator />

Expand Down
Loading