Added unused imports and vars and fixed lint (#929)
This commit is contained in:
@ -83,7 +83,7 @@ export function CommentThreadComments({ commentThread }: OwnProps) {
|
||||
<>
|
||||
<StyledThreadItemListContainer>
|
||||
<StyledThreadCommentTitle>Comments</StyledThreadCommentTitle>
|
||||
{commentThread?.comments?.map((comment, index) => (
|
||||
{commentThread?.comments?.map((comment) => (
|
||||
<Comment key={comment.id} comment={comment} />
|
||||
))}
|
||||
</StyledThreadItemListContainer>
|
||||
|
||||
@ -24,7 +24,7 @@ export function useApolloFactory() {
|
||||
fields: {
|
||||
commentThreadTargets: {
|
||||
merge(
|
||||
existing: CommentThreadTarget[] = [],
|
||||
_existing: CommentThreadTarget[] = [],
|
||||
incoming: CommentThreadTarget[],
|
||||
) {
|
||||
return [...incoming];
|
||||
|
||||
@ -19,7 +19,6 @@ type OwnProps = {
|
||||
>
|
||||
| null
|
||||
| undefined;
|
||||
onChange?: (firstName: string, lastName: string) => void;
|
||||
onSubmit?: (firstName: string, lastName: string) => void;
|
||||
onCancel?: () => void;
|
||||
};
|
||||
@ -33,7 +32,6 @@ const NoEditModeContainer = styled.div`
|
||||
|
||||
export function EditablePeopleFullName({
|
||||
person,
|
||||
onChange,
|
||||
onSubmit,
|
||||
onCancel,
|
||||
}: OwnProps) {
|
||||
|
||||
@ -76,7 +76,7 @@ const StyledButton = styled.button<
|
||||
}
|
||||
}};
|
||||
border-style: solid;
|
||||
border-width: ${({ theme, variant, position }) => {
|
||||
border-width: ${({ variant, position }) => {
|
||||
switch (variant) {
|
||||
case 'primary':
|
||||
case 'secondary':
|
||||
|
||||
@ -117,7 +117,6 @@ const StyledIconButton = styled.button<
|
||||
|
||||
export function IconButton({
|
||||
icon,
|
||||
title,
|
||||
variant = 'transparent',
|
||||
size = 'medium',
|
||||
textColor = 'tertiary',
|
||||
|
||||
@ -140,7 +140,7 @@ export function EditableField({
|
||||
transition={{ duration: 0.1 }}
|
||||
whileHover={{ scale: 1.04 }}
|
||||
>
|
||||
<EditableFieldEditButton customHotkeyScope={customEditHotkeyScope} />
|
||||
<EditableFieldEditButton />
|
||||
</motion.div>
|
||||
)}
|
||||
</EditableFieldBaseContainer>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { IconButton } from '@/ui/button/components/IconButton';
|
||||
import { HotkeyScope } from '@/ui/hotkey/types/HotkeyScope';
|
||||
import { IconPencil } from '@/ui/icon';
|
||||
import { overlayBackground } from '@/ui/themes/effects';
|
||||
|
||||
@ -26,11 +25,7 @@ export const StyledEditableFieldEditButton = styled.div`
|
||||
${overlayBackground}
|
||||
`;
|
||||
|
||||
type OwnProps = {
|
||||
customHotkeyScope?: HotkeyScope;
|
||||
};
|
||||
|
||||
export function EditableFieldEditButton({ customHotkeyScope }: OwnProps) {
|
||||
export function EditableFieldEditButton() {
|
||||
const { openEditableField } = useEditableField();
|
||||
|
||||
function handleClick() {
|
||||
|
||||
@ -27,7 +27,7 @@ type OwnProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> & {
|
||||
const StyledContainer = styled.div<Pick<OwnProps, 'fullWidth'>>`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: ${({ fullWidth, theme }) => (fullWidth ? `100%` : 'auto')};
|
||||
width: ${({ fullWidth }) => (fullWidth ? `100%` : 'auto')};
|
||||
`;
|
||||
|
||||
const StyledLabel = styled.span`
|
||||
|
||||
@ -19,9 +19,10 @@ export const snackBarInternalState = atom<SnackBarState>({
|
||||
},
|
||||
});
|
||||
|
||||
// TODO: use a recoil callback
|
||||
export const snackBarSetQueueState = selector<SnackBarOptions | null>({
|
||||
key: 'snackBarQueueState',
|
||||
get: ({ get }) => null, // We don't care about getting the value
|
||||
get: ({ get: _get }) => null, // We don't care about getting the value
|
||||
set: ({ set }, newValue) =>
|
||||
set(snackBarInternalState, (prev) => {
|
||||
if (prev.queue.length >= prev.maxQueue) {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { Checkbox } from '@/ui/input/components/Checkbox';
|
||||
@ -19,7 +18,8 @@ export const SelectAllCheckbox = () => {
|
||||
|
||||
const checked = allRowsSelectedStatus === 'all';
|
||||
const indeterminate = allRowsSelectedStatus === 'some';
|
||||
function onChange(value: boolean) {
|
||||
|
||||
function onChange() {
|
||||
selectAllRows();
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ export function EditableCellDoubleTextEditMode({
|
||||
secondValue,
|
||||
firstValuePlaceholder,
|
||||
secondValuePlaceholder,
|
||||
onChange,
|
||||
onSubmit,
|
||||
onCancel,
|
||||
}: OwnProps) {
|
||||
|
||||
@ -7,20 +7,16 @@ import { EditableCell } from '../components/EditableCell';
|
||||
type OwnProps = {
|
||||
placeholder?: string;
|
||||
value: string;
|
||||
onChange?: (newValue: string) => void;
|
||||
editModeHorizontalAlign?: 'left' | 'right';
|
||||
loading?: boolean;
|
||||
onSubmit?: (newText: string) => void;
|
||||
onCancel?: () => void;
|
||||
};
|
||||
|
||||
export function EditableCellText({
|
||||
value,
|
||||
placeholder,
|
||||
onChange,
|
||||
editModeHorizontalAlign,
|
||||
loading,
|
||||
onCancel,
|
||||
onSubmit,
|
||||
}: OwnProps) {
|
||||
return (
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import { EntityChip, EntityChipVariant } from '@/ui/chip/components/EntityChip';
|
||||
import { EntityChip } from '@/ui/chip/components/EntityChip';
|
||||
|
||||
export type UserChipPropsType = {
|
||||
id: string;
|
||||
name: string;
|
||||
pictureUrl?: string;
|
||||
variant?: EntityChipVariant;
|
||||
};
|
||||
|
||||
export function UserChip({ id, name, pictureUrl, variant }: UserChipPropsType) {
|
||||
export function UserChip({ id, name, pictureUrl }: UserChipPropsType) {
|
||||
return (
|
||||
<EntityChip
|
||||
entityId={id}
|
||||
|
||||
Reference in New Issue
Block a user