1 line
18 KiB
JSON
1 line
18 KiB
JSON
|
|
{"ast":null,"code":"import{useState}from\"react\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";export default function ShipComponent(){//progress bar value 선언\nconst[value,setValue]=useState(60);// 갤러리 이미지\nconst images=[{src:\"/images/photo_ship_001.png\",alt:\"1511함A-05\"},{src:\"/images/photo_ship_002.png\",alt:\"1511함A-05\"}];const[currentIndex,setCurrentIndex]=useState(0);const handlePrev=()=>{if(currentIndex===0)return;setCurrentIndex(prev=>prev-1);};const handleNext=()=>{if(currentIndex===images.length-1)return;setCurrentIndex(prev=>prev+1);};return/*#__PURE__*/_jsx(\"section\",{id:\"shipComponent\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"popupMap shipInfo\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"pmHeader\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"rowL\",children:[/*#__PURE__*/_jsx(\"i\",{className:\"shipType\"}),/*#__PURE__*/_jsx(\"img\",{src:\"/images/flag_kor.svg\",alt:\"\\uB300\\uD55C\\uBBFC\\uAD6D\",className:\"flagIcon\"}),/*#__PURE__*/_jsx(\"span\",{className:\"shipName\",children:\"1511\\uD568A-05\"}),/*#__PURE__*/_jsx(\"span\",{className:\"shipNum\",children:\"13450135\"})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"pmClose\",\"aria-label\":\"\\uB2EB\\uAE30\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"pmGallery\",children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"navBtn prev\",onClick:handlePrev,disabled:currentIndex===0,children:/*#__PURE__*/_jsx(\"span\",{className:\"blind\",children:\"\\uC774\\uC804\"})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"navBtn next\",onClick:handleNext,disabled:currentIndex===images.length-1,children:/*#__PURE__*/_jsx(\"span\",{className:\"blind\",children:\"\\uB2E4\\uC74C\"})}),/*#__PURE__*/_jsx(\"div\",{className:\"galleryView\",children:/*#__PURE__*/_jsx(\"img\",{className:\"galleryImg\",src:images[currentIndex].src,alt:images[currentIndex].alt})})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"pmBody\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"shipAction\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"rowL\",children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"detailBtn\",children:\"\\uC0C1\\uC138\\uC815\\uBCF4\"}),/*#__PURE__*/_jsxs(\"ul\",{className:\"shipTypeIco\",children:[/*#__PURE__*/_jsx(\"li\",{children:\"A\"}),/*#__PURE__*/_jsx(\"li\",{children:\"V\"}),/*#__PURE__*/_jsx(\"li\",{children:\"E\"}),/*#__PURE__*/_jsx(\"li\",{children:\"T\"}),/*#__PURE__*/_jsx(\"li\",{children:\"D\"}),/*#__PURE__*/_jsx(\"li\",{children:\"R\"})]})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"favBtn\",\"aria-label\":\"\\uC990\\uACA8\\uCC3E\\uAE30\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"shipRoute\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"routeProgress\",style:{\"--progress\":value},children:[/*#__PURE__*/_jsxs(\"progress\",{max:\"100\",value:value,children:[value,\"%\"]}),/*#__PURE__*/_jsx(\"span\",{className:\"routeShip\"})]})}),/*#__PURE__*/_jsxs(\"ul\",{className:\"shipStatus\",children:[/*#__PURE__*/_jsxs(\"li\",{className:\"port\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"rowL\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"portLabel\",children:\"\\uCD9C\\uD56D\\uC9C0\"}),/*#__PURE__*/_jsx(\"span\",{className:\"portName\",children:\"\\uC11C\\uADC0\\uD3EC\\uD574\\uC591\\uACBD\\uCC30\\uC11C\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"rowR\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"portLabel\",children:\"\\uC785\\uD56D\\uC9C0\"}),/*#__PURE__*/_jsx(\"span\",{className:\"portName\",children:\"\\uD558\\uD0DC\\uB3C4\"})]})]}),/*#__PURE__*/_jsxs(\"li\",{className:\"schedule\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"rowL\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"depart\",children:\"\\uCD9C\\uD56D\\uC77C\\uC2DC\"}),/*#__PURE__*/_jsx(\"span\",{className:\"scheduleDate\",children:\"2024-11-23 11:23:00\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"rowR\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"arrive\",children:\"\\uC785\\uD56D\\uC77C\\uC2DC\"}),/*#__PURE__*/_jsx(\"span\",{cl
|