Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
feat(page:problemNum): set title as link to view problem pdf
Browse files Browse the repository at this point in the history
  ## what
  - set title as link to view problem pdf

  ## how

  ## why
  - to be able to view the problem that is currently loaded

  ## where
  - ./src/app/problems/[problemNum]/page.tsx

  ## usage
  • Loading branch information
Clumsy-Coder committed Jan 12, 2024
1 parent c4e856c commit ffd247c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/problems/[problemNum]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import SubmissionLanguageRadarChart from "@/components/charts/SubmissionLanguage
import { DataTable } from "@/components/ui/data-table";
import { columns } from "./components/data-table/ranklistColumns";
import Loading from "./loading"
import Link from "next/link";
import { uhuntViewProblemUrl } from "@/utils/constants";

type problemPageProps = {
params: z.infer<typeof problemNumSchema>;
Expand Down Expand Up @@ -104,8 +106,10 @@ const ProblemPage = ({ params }: problemPageProps) => {
const processedProblemVerdictData = processProblemNumBarChartData(problemNumData.data)
return (
<section>
<h1 className="text-3xl mb-4">{params.problemNum}: {problemNumData.data.title}</h1>
<div className="grid lg:grid-cols-2 gap-4 mb-4">
<Link href={uhuntViewProblemUrl(problemNumData.data.pid)} className="text-3xl hover:underline" target="_blank">
{params.problemNum}: {problemNumData.data.title}
</Link>
<div className="grid lg:grid-cols-2 gap-4 mb-4 mt-4">
{/* Submission verdicts bar chart */}
<div className="w-full">
<Card>
Expand Down

0 comments on commit ffd247c

Please sign in to comment.