Showing 82 of 278 total issues
Function SearchPure
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SearchPure = (props: SearchProps): JSX.Element => {
const { show, loading, events, onHide } = props;
const [ref, setRef] = useState<HTMLInputElement | null>(null);
const listbox = useRef<HTMLUListElement | null>(null);
Function Crown
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Crown = (props: CrownProps): JSX.Element => {
const { genre, genres, loading, onGenreChange } = props;
const { focusedAt, startAt, endAt, setFocusedAt } = useTimetable();
// "today" or "yesterday" "tomorrow" here are defined as relative from the focus
Function ReadyEntry
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReadyEntry = (props: ReadyEntryProps): JSX.Element => {
const {
variant,
layout,
url,
Function StreamMarker
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const StreamMarker = (props: StreamProps): JSX.Element | null => {
const { stream } = props;
const isDark = usePrefersColorScheme();
const { hover, handleFocus, handleBlur } = useDelayedHover();
Function EventMarker
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const EventMarker = (props: EventProps): JSX.Element | null => {
const { event } = props;
const liver = event.livers[0];
const isDark = usePrefersColorScheme();
Function createSeed
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createSeed = async (config: IConfig): Promise<void> => {
const client = new PrismaClient();
await client.user.create({
data: {
Function Imprint
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Imprint = (/* props: ImprintProps */): JSX.Element => {
// const {} = props;
const [changeLog, setChangeLog] = useState(false);
Function Streams
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Streams = (props: StreamsProps): JSX.Element | null => {
const { data: streams, isValidating } = useAspidaSWR(client.rest.v1.streams, {
query: { since, until },
});
Function Events
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Events = (props: EventsProps): JSX.Element | null => {
const { events, loading } = useEvents();
const upcomingEvents = useUpcomingEvents();
const genreQuery = useGenreQueryParam();
const [genre, setGenre] = useState(genreQuery ?? GENRE_ALL);
Function Banner
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Banner = (): JSX.Element => {
return (
<header
aria-label="ヘッダー"
className={classNames(
Function SpellPure
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SpellPure = (props: SpellProps): JSX.Element => {
const { date, size } = props;
const {
scale,
Function ActiveLivers
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ActiveLivers = (props: ActiveLiversProps): JSX.Element => {
const { upcomingEvents: events } = props;
const [expanded, setExpanded] = useState(false);
useEffect(() => {
Function Timetable
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Timetable = (props: TimetableProps): JSX.Element => {
const { schedules, swapDelta, loading } = props;
const { ref, scale, startAt, setFocusedAt, setFocusedAtRaw } = useTimetable();
const { x: fromLeft } = useScroll(ref);
Function Skyscraper
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Skyscraper = (props: SkyscraperProps): JSX.Element => {
const {
mode = 'events',
events,
loading,
Function ModalPure
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ModalPure = (props: ModalProps): JSX.Element | null => {
const { show, title, children, className, getRoot, getContainer, onHide } =
props;
const root = getRoot instanceof Element ? getRoot : getRoot?.();
Function MinuteHand
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const MinuteHand = (): JSX.Element => {
const { focusedAt } = useTimetable();
return (
<div
Function Inner
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Inner = (): JSX.Element => {
return (
<div
className={classNames(
'flex',
Function ReadyUser
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReadyUser = (props: ReadyUserProps): JSX.Element => {
const {
name,
avatar,
url,
Function fetchVideo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async fetchVideo(videoId: string): Promise<Video> {
const videos = await this._yt.videos.list({
id: [videoId],
// part: ['snippet', 'contentDetails', 'statistics', 'liveStreamingDetails'],
part: [
Function SearchButton
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SearchButton = (props: SearchButtonProps): JSX.Element => {
const { events, loading } = props;
const ref = useRef<HTMLButtonElement | null>(null);
const [open, setOpen] = useState(false);