Skip to content

Commit

Permalink
n99: refactor: Refactor imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-kiliushin committed Jun 18, 2023
1 parent b214f28 commit 068db43
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
3 changes: 2 additions & 1 deletion cypress/component/Dialog.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Button, Typography } from "@mui/material"
import { FC } from "react"
import { useToggle } from "react-use"

import { Dialog } from "#components/Dialog"

const SampleComponentWithDialog: React.FC = () => {
const SampleComponentWithDialog: FC = () => {
const [isMyDialogOpen, toggleIsMyDialogOpen] = useToggle(false)

return (
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/budget-board-creating.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Budget board creating", () => {
cy.contains('"clever-budgetiers" budget board already exists.').should("be.visible")
})

it("board craeted successfully", () => {
it("board created successfully", () => {
cy.authorize(testUsers.johnDoe.id)

cy.visit("/boards")
Expand Down
3 changes: 2 additions & 1 deletion src/components/Navbar/helpers.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Dashboard as DashboardIcon, Person as PersonIcon } from "@mui/icons-material"
import { ReactElement } from "react"

type TSection = {
icon: React.ReactElement
icon: ReactElement
id: string
path: string
}
Expand Down
10 changes: 2 additions & 8 deletions src/utils/getChildByDisplayName.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { Children, isValidElement } from "react"
import { Children, ReactNode, isValidElement } from "react"

export const getChildByDisplayName = ({
children,
displayName,
}: {
children: React.ReactNode
displayName: string
}) => {
export const getChildByDisplayName = ({ children, displayName }: { children: ReactNode; displayName: string }) => {
return Children.map(children, (child) => {
if (!isValidElement(child)) return null
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit 068db43

Please sign in to comment.