1+ import { isArray , isObject } from "complete-common" ;
12import { useEffect } from "react" ;
23import { CircularProgressbar } from "react-circular-progressbar" ;
34import "react-circular-progressbar/dist/styles.css" ; // eslint-disable-line @typescript-eslint/no-restricted-imports, import-x/no-unassigned-import
45import sidebars from "../sidebars" ;
5- import { isObject } from "./utils" ;
66
77/**
88 * Extracts a list of page paths from a specific sidebar section or subsection.
@@ -12,7 +12,7 @@ import { isObject } from "./utils";
1212 */
1313export function getSidebarParts ( ...path : readonly string [ ] ) : readonly string [ ] {
1414 const { mainSidebar } = sidebars ;
15- if ( mainSidebar === undefined || ! Array . isArray ( mainSidebar ) ) {
15+ if ( mainSidebar === undefined || ! isArray ( mainSidebar ) ) {
1616 throw new TypeError (
1717 'Failed to parse the "mainSidebar" from "sidebars.ts".' ,
1818 ) ;
@@ -28,7 +28,7 @@ export function getSidebarParts(...path: readonly string[]): readonly string[] {
2828
2929 if ( ! isObject ( element ) ) {
3030 throw new TypeError ( `Failed to find "${ name } " in "sidebars.ts".` ) ;
31- } else if ( ! Array . isArray ( element [ name ] ) ) {
31+ } else if ( ! isArray ( element [ name ] ) ) {
3232 throw new TypeError (
3333 `Failed to parse "${ name } " element from "sidebars.ts".` ,
3434 ) ;
@@ -49,7 +49,7 @@ export function getSidebarParts(...path: readonly string[]): readonly string[] {
4949
5050 if ( isObject ( element ) ) {
5151 const subParts = Object . values ( element ) [ 0 ] ;
52- if ( ! Array . isArray ( subParts ) ) {
52+ if ( ! isArray ( subParts ) ) {
5353 throw new TypeError (
5454 'Failed to parse a sub-element array in "sidebars.ts".' ,
5555 ) ;
@@ -96,7 +96,7 @@ export function createProgressComponent(
9696
9797 return (
9898 < div id = "percent" >
99- < CircularProgressbar value = { percentage } text = { `${ percentage } %` } />
99+ < CircularProgressbar text = { `${ percentage } %` } value = { percentage } />
100100 </ div >
101101 ) ;
102102 } ;
0 commit comments