Skip to content

Commit 6c95de9

Browse files
authored
[Beta] Delete unused variables (#4379)
* Delete unused variables * Change event to e * Change e to evt
1 parent 6bd09fe commit 6c95de9

File tree

12 files changed

+7
-21
lines changed

12 files changed

+7
-21
lines changed

beta/src/components/Icon/IconChevron.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const IconChevron = React.memo<
99
JSX.IntrinsicElements['svg'] & {
1010
displayDirection: 'up' | 'down' | 'left' | 'right';
1111
}
12-
>(function IconChevron({className, displayDirection, ...rest}) {
12+
>(function IconChevron({className, displayDirection}) {
1313
const classes = cn(
1414
{
1515
'rotate-0': displayDirection === 'down',

beta/src/components/Icon/IconNavArrow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const IconNavArrow = React.memo<
99
JSX.IntrinsicElements['svg'] & {
1010
displayDirection: 'right' | 'down' | 'left';
1111
}
12-
>(function IconNavArrow({displayDirection = 'right', className, ...rest}) {
12+
>(function IconNavArrow({displayDirection = 'right', className}) {
1313
const classes = cn(
1414
'duration-100 ease-in transition',
1515
{

beta/src/components/Layout/Sidebar/Sidebar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import {MenuContext} from 'components/useMenu';
99
import {useMediaQuery} from '../useMediaQuery';
1010
import {SidebarRouteTree} from './SidebarRouteTree';
1111
import {Search} from 'components/Search';
12-
import {Button} from 'components/Button';
1312
import {MobileNav} from '../Nav/MobileNav';
1413
import {Feedback} from '../Feedback';
1514

1615
const SIDEBAR_BREAKPOINT = 1023;
1716

18-
export function Sidebar({isMobileOnly}: {isMobileOnly?: boolean}) {
17+
export function Sidebar() {
1918
const {menuRef, isOpen} = React.useContext(MenuContext);
2019
const isMobileSidebar = useMediaQuery(SIDEBAR_BREAKPOINT);
2120
let routeTree = React.useContext(SidebarContext);

beta/src/components/MDX/CodeBlock/CodeBlock.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ const CodeBlock = function CodeBlock({
2323
className = 'language-js',
2424
metastring,
2525
noMargin,
26-
noMarkers,
2726
}: {
2827
children: string;
2928
className?: string;
3029
metastring: string;
3130
noMargin?: boolean;
32-
noMarkers?: boolean;
3331
}) {
3432
const getDecoratedLineInfo = () => {
3533
if (!metastring) {

beta/src/components/MDX/Intro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Facebook, Inc. and its affiliates.
33
*/
44

5-
import React, {ReactNode} from 'react';
5+
import React from 'react';
66

77
export interface IntroProps {
88
children?: React.ReactNode;

beta/src/components/MDX/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function Link({
1717
const classes =
1818
'inline text-link dark:text-link-dark break-normal border-b border-link border-opacity-0 hover:border-opacity-100 duration-100 ease-in transition leading-normal';
1919
const modifiedChildren = React.Children.toArray(children).map(
20-
(child: any, idx: number) => {
20+
(child: any) => {
2121
if (child.props?.mdxType && child.props?.mdxType === 'inlineCode') {
2222
return React.cloneElement(child, {
2323
isLink: true,

beta/src/components/MDX/MDXComponents.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,12 @@ function Illustration({
200200
alt,
201201
author,
202202
authorLink,
203-
children,
204203
}: {
205204
caption: string;
206205
src: string;
207206
alt: string;
208207
author: string;
209208
authorLink: string;
210-
children: any;
211209
}) {
212210
return (
213211
<div className="my-16 mx-0 2xl:mx-auto max-w-4xl 2xl:max-w-6xl">

beta/src/components/MDX/Sandpack/ResetButton.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
import * as React from 'react';
66
import {IconRestart} from '../../Icon/IconRestart';
77
export interface ResetButtonProps {
8-
clientId?: string;
98
onReset: () => void;
109
}
1110

12-
export const ResetButton: React.FC<ResetButtonProps> = ({
13-
clientId,
14-
onReset,
15-
}) => {
11+
export const ResetButton: React.FC<ResetButtonProps> = ({onReset}) => {
1612
return (
1713
<button
1814
className="text-sm text-primary dark:text-primary-dark inline-flex items-center hover:text-link duration-100 ease-in transition mx-1"

beta/src/components/MDX/Sandpack/utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ export const computeViewportSize = (
4949
};
5050

5151
export const createFileMap = (codeSnippets: any) => {
52-
let isSingleFile = true;
53-
5452
return codeSnippets.reduce(
5553
(result: Record<string, SandpackFile>, codeSnippet: React.ReactElement) => {
5654
if (codeSnippet.props.mdxType !== 'pre') {
@@ -70,7 +68,6 @@ export const createFileMap = (codeSnippets: any) => {
7068
if (params.includes('active')) {
7169
fileActive = true;
7270
}
73-
isSingleFile = false;
7471
} else {
7572
if (props.className === 'language-js') {
7673
filePath = '/App.js';

beta/src/components/useMenu.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
} from 'body-scroll-lock';
1111
import {useRouter} from 'next/router';
1212

13-
type SidebarNav = 'root' | 'docs' | 'apis';
1413
/**
1514
* Menu toggle that enables body scroll locking (for
1615
* iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox)

0 commit comments

Comments
 (0)