Skip to content

Instantly share code, notes, and snippets.

View nmorozov's full-sized avatar

Nikita Morozov nmorozov

  • zvuk.com
  • Ulyanovsk, Russia
View GitHub Profile
@nmorozov
nmorozov / gist:029760916e3b258a9479fc4f8cf72b5e
Created November 10, 2026 14:43
Фрагмент кода
import { routes } from 'src/shared/utils/routing/routes';
import { GRID_V2_ACTION_KIND, GRID_V2_ACTION_REGISTRY, GRID_V2_RELATIVE_URL_BASE } from './constants';
import type { GridV2ActionCommand, GridV2ActionName, GridV2Autoplay } from './types';
import type { GridV2Action } from 'src/shared/types/grid/gridV2';
const NOOP_COMMAND: GridV2ActionCommand = { type: 'noop' };
const getStringId = (id: GridV2Action['id']) => {
import { useEffect, useState } from 'react'
type TUseMatchMedia = {
isDesktopSize: boolean
isTabletSize: boolean
isMobileSize: boolean
}
const useMatchMedia = (): TUseMatchMedia => {
const mobileQuery = window.matchMedia('(min-width: 320px) and (max-width: 767px)')