Big Updated, added some tests, added comments for all functions, I forgot the rest

This commit is contained in:
Alois 2026-03-15 14:52:09 +01:00
commit 90a1059cc8
59 changed files with 1816 additions and 203 deletions

View file

@ -2,6 +2,11 @@ import * as React from "react";
type Category = "conversations" | "communities";
/**
* Executes Switch.
* @param props Parameter props.
* @returns unknown.
*/
export default function Switch(props: {
category: Category;
setCategory: (category: Category) => void;
@ -28,6 +33,11 @@ export default function Switch(props: {
updateIndicator();
}, [updateIndicator]);
/**
* Executes toggleCategory.
* @param none This function has no parameters.
* @returns unknown.
*/
function toggleCategory() {
props.setCategory(
props.category === "conversations" ? "communities" : "conversations",