Route path="xxx" component={MyPage}
на Route path="xxx" element={<MyPage />}
) const draggable = document.getElementById("draggable");
let isDragging = true;
draggable.addEventListener("touchstart", () => {
isDragging = true;
});
draggable.addEventListener("touchend", () => {
isDragging = false;
});
draggable.addEventListener("touchmove", (event) => {
if (isDragging) {
const { pageX, pageY } = event.touches[0];
draggable.style.top = pageY + "px";
draggable.style.left = pageX + "px";
}
});
{ 0: string, 1: string, 2: string, 3: string, 45: string }
, но никак не { [key: number]: string }
, который ожидали бы.useState<keyof typeof wwCodes>
type WwCodes = Record<number, string | undefined>
const wwCodes: WwCodes = ...
IMAGE_INLINE_SIZE_LIMIT
через переменные окружения.// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: imageInlineSizeLimit,
},
},
},