import { Link } from 'react-router-dom'; import { MonitorDown, CircleUser, Home, LineChart, Menu, Package, Package2, Search, ShoppingCart, Users, Settings, PackagePlus, BookHeart, Loader , } from "lucide-react" import { Badge } from "@/components/shadcn/ui/badge" import { Button } from "@/components/shadcn/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/shadcn/ui/card" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/shadcn/ui/dropdown-menu" import { Input } from "@/components/shadcn/ui/input" import { Sheet, SheetContent, SheetTrigger } from "@/components/shadcn/ui/sheet" import ModeToggle from '@/components/shadcn/mode-toggle' import axios from 'axios' import { useEffect, useState } from 'react' import parse from 'html-react-parser' // html -> jsx 테스트 function Dashboard() { const [htmlContent, setHtmlContent] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { axios.get('/api/&wr_id=16') .then(res => { const htmlString = res.data setHtmlContent(parse(htmlString)) }) .catch(err => console.log(err)) .finally(() => setLoading(false)); // 데이터 로드 완료 후 로딩 상태 업데이트 }, []); return (
313 DEV GRP
Upgrade to Pro Unlock all features and get unlimited access to our support team.
My Account Settings Support Logout
{/* 테스트 */} {loading ? (
) : ( htmlContent )}
) } export default Dashboard