Skip to content

Commit

Permalink
fix message rendering when no cube is selected on solves area
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlundberg committed Sep 12, 2024
1 parent 806c567 commit 934d99c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/app/[locale]/solves/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ export default function Page() {
</Card>

<TabsContent value="session">
{selectedCube && (
<SolvesArea displaySolves={selectedCube.solves.session} />
)}
<SolvesArea displaySolves={selectedCube?.solves.session} />
</TabsContent>
<TabsContent value="all">
{selectedCube && (
<SolvesArea displaySolves={selectedCube.solves.all} />
)}
<SolvesArea displaySolves={selectedCube?.solves.all} />
</TabsContent>

<Sheet open={isDialogSolveOpen} onOpenChange={handleCloseDialogSolve}>
Expand Down
3 changes: 1 addition & 2 deletions src/components/solves/SolvesArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import { useDialogSolve } from "@/store/DialogSolve";
import { sort } from "fast-sort";
import { useSolveFiltersStore } from "@/store/SolvesFilters";
import { filterData, SearchType } from "filter-data";
import { Solves } from "@/interfaces/Solves";

interface SolvesArea {
displaySolves: Solve[];
displaySolves: Solve[] | undefined;
}

export function SolvesArea({ displaySolves }: SolvesArea) {
Expand Down

0 comments on commit 934d99c

Please sign in to comment.