Commit 14e48258 authored by jakub uhlarik's avatar jakub uhlarik
Browse files
parents db2e1757 92e83466
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ import { LinkButton } from '../LinkButton.tsx';
import { useConfiguration } from '../../hooks/configurationHook';

export type CategoryInputType = Category & { view: 'view' | 'add' };
// view true for viewing false fro editing
// view true for viewing false for editing
export function CategoryView({ id, name, view }: CategoryInputType) {
  const { addCategory, configuration } = useConfiguration();
  return (
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ export function MemoryFilters() {
  const memories = useRecoilValue(memoriesAtom);
  const [minPrice, maxPrice] = memories.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.price),
      Math.max(max, curr.price),
      Math.floor(Math.min(min, curr.price)),
      Math.round(Math.max(max, curr.price)),
    ],
    [Infinity, 0]
  );
+4 −4
Original line number Diff line number Diff line
@@ -56,8 +56,8 @@ export function MotherboardFilters() {
  const motherboards = useRecoilValue(motherboardsAtom);
  const [minPrice, maxPrice] = motherboards.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.price),
      Math.max(max, curr.price),
      Math.floor(Math.min(min, curr.price)),
      Math.round(Math.max(max, curr.price)),
    ],
    [Infinity, 0]
  );
@@ -108,8 +108,8 @@ export function MotherboardFilters() {

  const [minSlots, maxSlots] = motherboards.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.memorySlotCount),
      Math.max(max, curr.memorySlotCount),
      Math.floor(Math.min(min, curr.memorySlotCount)),
      Math.round(Math.max(max, curr.memorySlotCount)),
    ],
    [Infinity, 0]
  );
+2 −2
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ export function ProcessorFilters() {
  const processors = useRecoilValue(processorsAtom);
  const [minPrice, maxPrice] = processors.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.price),
      Math.max(max, curr.price),
      Math.floor(Math.min(min, curr.price)),
      Math.round(Math.max(max, curr.price)),
    ],
    [Infinity, 0]
  );
+4 −4
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ export function VideoCardFilters() {
  const videoCards = useRecoilValue(videoCardsAtom);
  const [minPrice, maxPrice] = videoCards.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.price),
      Math.max(max, curr.price),
      Math.floor(Math.min(min, curr.price)),
      Math.round(Math.max(max, curr.price)),
    ],
    [Infinity, 0]
  );
@@ -94,8 +94,8 @@ export function VideoCardFilters() {

  const [minSlots, maxSlots] = videoCards.reduce<[number, number]>(
    ([min, max], curr) => [
      Math.min(min, curr.slotSize),
      Math.max(max, curr.slotSize),
      Math.floor(Math.min(min, curr.slotSize)),
      Math.round(Math.max(max, curr.slotSize)),
    ],
    [Infinity, 0]
  );
Loading