Remove some dead code (#6611)

We could remove a lot more than this, this is just a start.

There are various tools to help with this, knip is a good one
This commit is contained in:
Félix Malfait
2024-08-11 20:43:18 +02:00
committed by GitHub
parent 39512a779e
commit d5350e11a3
61 changed files with 23 additions and 1044 deletions

View File

@ -14,7 +14,7 @@ type StyledDropdownButtonProps = {
isUnfolded: boolean;
};
export const StyledDropdownButtonContainer = styled.div<StyledDropdownButtonProps>`
const StyledDropdownButtonContainer = styled.div<StyledDropdownButtonProps>`
align-items: center;
color: ${({ color }) => color ?? 'none'};
cursor: pointer;

View File

@ -21,7 +21,7 @@ import { UserContext } from '@/users/contexts/UserContext';
import { useContext } from 'react';
import 'react-datepicker/dist/react-datepicker.css';
export const months = [
const months = [
{ label: 'January', value: 0 },
{ label: 'February', value: 1 },
{ label: 'March', value: 2 },
@ -36,7 +36,7 @@ export const months = [
{ label: 'December', value: 11 },
];
export const years = Array.from(
const years = Array.from(
{ length: 200 },
(_, i) => new Date().getFullYear() + 5 - i,
).map((year) => ({ label: year.toString(), value: year }));
@ -299,7 +299,7 @@ const StyledCustomDatePickerHeader = styled.div`
gap: ${({ theme }) => theme.spacing(1)};
`;
export type InternalDatePickerProps = {
type InternalDatePickerProps = {
date: Date | null;
onMouseSelect?: (date: Date | null) => void;
onChange?: (date: Date | null) => void;

View File

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { useEffect, useState } from 'react';
import { IconChevronDown, IconWorld } from 'twenty-ui';
import { useCountries } from '@/ui/input/components/internal/hooks/useCountries';
@ -19,7 +19,7 @@ type StyledDropdownButtonProps = {
isUnfolded: boolean;
};
export const StyledDropdownButtonContainer = styled.div<StyledDropdownButtonProps>`
const StyledDropdownButtonContainer = styled.div<StyledDropdownButtonProps>`
align-items: center;
background: none;
border-radius: ${({ theme }) => theme.border.radius.xs} 0 0