Big Updated, added some tests, added comments for all functions, I forgot the rest
This commit is contained in:
parent
d77271e4b7
commit
90a1059cc8
59 changed files with 1816 additions and 203 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue