mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Remove unused params from destructuring
GitOrigin-RevId: e47a16e2d99e923c314fd0fa2220c19b7b2c9b51
This commit is contained in:
@@ -291,7 +291,6 @@ type MenuItemButtonProps = {
|
||||
function MenuItemButton({
|
||||
children,
|
||||
onClick,
|
||||
className,
|
||||
isLoading,
|
||||
variant,
|
||||
'data-testid': dataTestId,
|
||||
|
||||
@@ -1,40 +1,20 @@
|
||||
import getMeta from '@/utils/meta'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { memo, useCallback, useEffect } from 'react'
|
||||
import { memo, useEffect } from 'react'
|
||||
import { useDetachCompileContext } from '@/shared/context/detach-compile-context'
|
||||
import StartFreeTrialButton from '@/shared/components/start-free-trial-button'
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
import { useStopOnFirstError } from '@/shared/hooks/use-stop-on-first-error'
|
||||
import * as eventTracking from '@/infrastructure/event-tracking'
|
||||
import PdfLogEntry from './pdf-log-entry'
|
||||
|
||||
function TimeoutMessageAfterPaywallDismissal() {
|
||||
const {
|
||||
startCompile,
|
||||
lastCompileOptions,
|
||||
setAnimateCompileDropdownArrow,
|
||||
isProjectOwner,
|
||||
} = useDetachCompileContext()
|
||||
|
||||
const { enableStopOnFirstError } = useStopOnFirstError({
|
||||
eventSource: 'timeout-new',
|
||||
})
|
||||
|
||||
const handleEnableStopOnFirstErrorClick = useCallback(() => {
|
||||
enableStopOnFirstError()
|
||||
startCompile({ stopOnFirstError: true })
|
||||
setAnimateCompileDropdownArrow(true)
|
||||
}, [enableStopOnFirstError, startCompile, setAnimateCompileDropdownArrow])
|
||||
const { lastCompileOptions, isProjectOwner } = useDetachCompileContext()
|
||||
|
||||
return (
|
||||
<div className="website-redesign timeout-upgrade-paywall-prompt">
|
||||
<CompileTimeout isProjectOwner={isProjectOwner} />
|
||||
{getMeta('ol-ExposedSettings').enableSubscriptions && (
|
||||
<PreventTimeoutHelpMessage
|
||||
handleEnableStopOnFirstErrorClick={handleEnableStopOnFirstErrorClick}
|
||||
lastCompileOptions={lastCompileOptions}
|
||||
isProjectOwner={isProjectOwner}
|
||||
/>
|
||||
<PreventTimeoutHelpMessage lastCompileOptions={lastCompileOptions} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
@@ -124,14 +104,10 @@ const CompileTimeout = memo(function CompileTimeout({
|
||||
|
||||
type PreventTimeoutHelpMessageProps = {
|
||||
lastCompileOptions: any
|
||||
handleEnableStopOnFirstErrorClick: () => void
|
||||
isProjectOwner: boolean
|
||||
}
|
||||
|
||||
const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
|
||||
lastCompileOptions,
|
||||
handleEnableStopOnFirstErrorClick,
|
||||
isProjectOwner,
|
||||
}: PreventTimeoutHelpMessageProps) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
||||
@@ -247,7 +247,6 @@ function usageAboveThreshold(chunk) {
|
||||
function cutRequestAmplification({
|
||||
potentialChunks,
|
||||
usageScore,
|
||||
cachedUrls,
|
||||
metrics,
|
||||
start,
|
||||
end,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
DropdownToggle,
|
||||
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
|
||||
|
||||
function Item({ onClick, text, iconType, screenReaderText }: SortBtnProps) {
|
||||
function Item({ onClick, text, iconType }: SortBtnProps) {
|
||||
return (
|
||||
<DropdownItem
|
||||
as="button"
|
||||
|
||||
@@ -12,10 +12,9 @@ import { DropdownItem } from '@/features/ui/components/bootstrap-5/dropdown-menu
|
||||
|
||||
type TagsListProps = {
|
||||
onTagClick?: () => void
|
||||
onEditClick?: () => void
|
||||
}
|
||||
|
||||
function TagsList({ onTagClick, onEditClick }: TagsListProps) {
|
||||
function TagsList({ onTagClick }: TagsListProps) {
|
||||
const { t } = useTranslation()
|
||||
const { tags, untaggedProjectsCount, selectedTagId, selectTag } =
|
||||
useProjectListContext()
|
||||
|
||||
@@ -115,7 +115,7 @@ function LinkingSection() {
|
||||
) : null}
|
||||
<div className="settings-widgets-container">
|
||||
{allIntegrationLinkingWidgets.map(
|
||||
({ import: importObject, path }, widgetIndex) => (
|
||||
({ import: importObject }, widgetIndex) => (
|
||||
<ModuleLinkingWidget
|
||||
key={Object.keys(importObject)[0]}
|
||||
ModuleComponent={Object.values(importObject)[0]}
|
||||
@@ -133,7 +133,7 @@ function LinkingSection() {
|
||||
<h3 id="references">{t('reference_managers')}</h3>
|
||||
<div className="settings-widgets-container">
|
||||
{referenceLinkingWidgets.map(
|
||||
({ import: importObject, path }, widgetIndex) => (
|
||||
({ import: importObject }, widgetIndex) => (
|
||||
<ModuleLinkingWidget
|
||||
key={Object.keys(importObject)[0]}
|
||||
ModuleComponent={Object.values(importObject)[0]}
|
||||
|
||||
@@ -116,7 +116,7 @@ export default function SelectCollaborators({
|
||||
items: filteredOptions,
|
||||
itemToString: item => (item && item.name) || '',
|
||||
stateReducer,
|
||||
onStateChange: ({ inputValue, type, selectedItem }) => {
|
||||
onStateChange: ({ type, selectedItem }) => {
|
||||
switch (type) {
|
||||
// add a selected item on Enter (keypress), click or blur
|
||||
case useCombobox.stateChangeTypes.InputKeyDownEnter:
|
||||
|
||||
Reference in New Issue
Block a user