sticker height
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
VITE_API_URL=http://89.32.249.26:4010
|
VITE_API_URL=https://dpage-api.danakcorp.com
|
||||||
# VITE_API_URL=http://192.168.99.131:4000
|
# VITE_API_URL=http://192.168.99.131:4000
|
||||||
VITE_TOKEN_NAME=dpage-editor-t
|
VITE_TOKEN_NAME=dpage-editor-t
|
||||||
VITE_REFRESH_TOKEN_NAME=dpage-editor-refresh-t
|
VITE_REFRESH_TOKEN_NAME=dpage-editor-refresh-t
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from "react";
|
|
||||||
import { useGetIconGroups } from "@/pages/editor/hooks/useIconData";
|
import { useGetIconGroups } from "@/pages/editor/hooks/useIconData";
|
||||||
import { STICKER_DRAG_MIME } from "@/pages/editor/types/IconTypes";
|
import { STICKER_DRAG_MIME } from "@/pages/editor/types/IconTypes";
|
||||||
|
import { useMemo } from "react";
|
||||||
|
|
||||||
const StickerInstruction = () => {
|
const StickerInstruction = () => {
|
||||||
const { data, isLoading, isError } = useGetIconGroups();
|
const { data, isLoading, isError } = useGetIconGroups();
|
||||||
@@ -10,7 +10,10 @@ const StickerInstruction = () => {
|
|||||||
return groups.flatMap((group) => group.icons);
|
return groups.flatMap((group) => group.icons);
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
const handleDragStart = (e: React.DragEvent<HTMLImageElement>, url: string) => {
|
const handleDragStart = (
|
||||||
|
e: React.DragEvent<HTMLImageElement>,
|
||||||
|
url: string,
|
||||||
|
) => {
|
||||||
e.dataTransfer.setData(STICKER_DRAG_MIME, url);
|
e.dataTransfer.setData(STICKER_DRAG_MIME, url);
|
||||||
e.dataTransfer.effectAllowed = "copy";
|
e.dataTransfer.effectAllowed = "copy";
|
||||||
};
|
};
|
||||||
@@ -35,7 +38,7 @@ const StickerInstruction = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{stickers.length > 0 && (
|
{stickers.length > 0 && (
|
||||||
<div className="grid grid-cols-3 gap-2 max-h-[320px] overflow-y-auto">
|
<div className="grid grid-cols-3 gap-2 overflow-y-auto">
|
||||||
{stickers.map((icon) => (
|
{stickers.map((icon) => (
|
||||||
<div
|
<div
|
||||||
key={icon.id}
|
key={icon.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user