Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
miaawong committed Oct 14, 2024
1 parent bf10e8c commit 1197fc3
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions web/src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import React, {
createContext,
useEffect,
useMemo,
useReducer,
useState,
} from "react";
import React, { createContext, useEffect, useReducer, useState } from "react";
import { createBrowserHistory } from "history";
import { Navigate, Route, Routes, useNavigate } from "react-router-dom";
import { Helmet } from "react-helmet";
Expand Down Expand Up @@ -84,6 +78,15 @@ const ThemeContext = createContext({
clearThemeState: () => {},
});

type NavbarConfigGroup = {
name: string;
title: string;
items: string[];
hidden: boolean;
hasError: boolean;
when: string;
};

type AppBranding = {
css?: string[];
fontFaces?: string[];
Expand Down Expand Up @@ -462,8 +465,10 @@ const Root = () => {
const navigate = useNavigate();

const [currentStep, setCurrentStep] = useState(0);
const [navbarConfigGroups, setNavbarConfigGroups] = useState<any>([]);
const [activeGroups, setActiveGroups] = useState<any>([]);
const [navbarConfigGroups, setNavbarConfigGroups] = useState<
NavbarConfigGroup[]
>([]);
const [activeGroups, setActiveGroups] = useState<string[]>([]);

const getStepProps = (step: number) => {
if (step < currentStep) {
Expand Down Expand Up @@ -498,7 +503,15 @@ const Root = () => {
};

const NavGroup = React.memo(
({ group, isActive, i }: { group: any; isActive: boolean; i: number }) => {
({
group,
isActive,
i,
}: {
group: NavbarConfigGroup;
isActive: boolean;
i: number;
}) => {
return (
<div
key={`${i}-${group.name}-${group.title}`}
Expand Down

0 comments on commit 1197fc3

Please sign in to comment.