Skip to content

Commit

Permalink
feat(components): add refresh button to results card
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmoin committed Apr 20, 2024
1 parent 40000bf commit 4457c7a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ export default function Dashboard() {
<SiteHeader />
<div className="flex min-h-screen w-full flex-col bg-muted/40">
<Sidebar />
<section className="container grid items-center gap-6 pb-8 pt-6 md:py-10">
<div className="flex max-w-[980px] flex-col items-start gap-2">
<h1 className="text-3xl font-extrabold leading-tight tracking-tighter md:text-4xl">
Comprehensive practice tests designed to help{" "}
<br className="hidden sm:inline" />
you prepare for Regents and Other exams.
</h1>
<p className="max-w-[700px] text-lg text-muted-foreground">
Effective and efficient templates that you can use or make your
own. Free. Open Source.
</p>
</div>
<div className="flex gap-4"></div>
</section>
<TemplateForm />
</div>
</>
Expand Down
14 changes: 7 additions & 7 deletions src/components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function MainNav() {
: "text-foreground/60"
)}
>
Docs
This
</Link>
<Link
href="#"
Expand All @@ -39,7 +39,7 @@ export function MainNav() {
: "text-foreground/60"
)}
>
Components
Site
</Link>
<Link
href="#"
Expand All @@ -50,7 +50,7 @@ export function MainNav() {
: "text-foreground/60"
)}
>
Themes
Is
</Link>
<Link
href="#"
Expand All @@ -61,7 +61,7 @@ export function MainNav() {
: "text-foreground/60"
)}
>
Examples
Work
</Link>
<Link
href="#"
Expand All @@ -72,15 +72,15 @@ export function MainNav() {
: "text-foreground/60"
)}
>
Blocks
In
</Link>
<Link
href={siteConfig.links.github}
href="#"
className={cn(
"hidden text-foreground/60 transition-colors hover:text-foreground/80 lg:block"
)}
>
GitHub
Progress
</Link>
</nav>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/components/results-card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
Expand Down Expand Up @@ -36,7 +37,7 @@ export function ResultsCard({
});
const correctPercentage = (correctCount / templateData.length) * 100;
return (
<div className="fixed z-50 top-0 left-0 w-full h-full flex justify-center items-center bg-card">
<div className="fixed z-50 top-0 left-0 w-full h-full flex-vertical justify-center items-center bg-card">
<div className="p-6">
<Card>
<CardHeader>
Expand All @@ -50,6 +51,9 @@ export function ResultsCard({
</CardContent>
</Card>
</div>
<div className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8">
<Button onClick={() => window.location.reload()}>Refresh</Button>
</div>
</div>
);
}

0 comments on commit 4457c7a

Please sign in to comment.