403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/elite-events-storybook/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/elite-events-storybook/components-ui-ErrorBoundary-stories.62b633a2.iframe.bundle.js
"use strict";(self.webpackChunkelite_events_nextjs=self.webpackChunkelite_events_nextjs||[]).push([[4737],{"./src/components/ui/ErrorBoundary.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Interactive:()=>Interactive,MultipleChildren:()=>MultipleChildren,NestedBoundaries:()=>NestedBoundaries,WithCustomFallback:()=>WithCustomFallback,WithError:()=>WithError,__namedExportsOrder:()=>__namedExportsOrder,default:()=>ErrorBoundary_stories});var jsx_runtime=__webpack_require__("./node_modules/next/dist/compiled/react/jsx-runtime.js"),ErrorBoundary=__webpack_require__("./src/components/shared/ErrorBoundary/index.tsx"),react=__webpack_require__("./node_modules/next/dist/compiled/react/index.js");const ErrorBoundary_stories={title:"UI/ErrorBoundary",component:ErrorBoundary.tH,parameters:{layout:"padded"},tags:["autodocs"]},ErrorThrowingComponent=({shouldThrow})=>{if(shouldThrow)throw new Error("This is a simulated error!");return(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Component rendered successfully!"})},ErrorTrigger=()=>{const[throwError,setThrowError]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[(0,jsx_runtime.jsx)("button",{onClick:()=>setThrowError(!0),className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:"Click to Trigger Error"}),(0,jsx_runtime.jsx)(ErrorBoundary.tH,{children:(0,jsx_runtime.jsx)(ErrorThrowingComponent,{shouldThrow:throwError})})]})},Default={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)(ErrorBoundary.tH,{children:(0,jsx_runtime.jsx)("div",{className:"p-4 bg-blue-50 border border-blue-200 text-blue-700 rounded",children:"This content is wrapped in an ErrorBoundary. No errors here!"})})},WithError={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)(ErrorBoundary.tH,{children:(0,jsx_runtime.jsx)(ErrorThrowingComponent,{shouldThrow:!0})}),parameters:{docs:{description:{story:"ErrorBoundary catching and displaying an error with the default fallback UI."}}}},WithCustomFallback={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)(ErrorBoundary.tH,{fallback:error=>(0,jsx_runtime.jsxs)("div",{className:"bg-yellow-50 border-2 border-yellow-400 text-yellow-800 px-6 py-4 rounded-lg",children:[(0,jsx_runtime.jsx)("h3",{className:"font-bold text-lg mb-2",children:"Oops! Custom Error Handler"}),(0,jsx_runtime.jsx)("p",{className:"mb-2",children:"We encountered an issue:"}),(0,jsx_runtime.jsx)("code",{className:"block bg-yellow-100 p-2 rounded text-sm",children:error.message}),(0,jsx_runtime.jsx)("button",{className:"mt-4 px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700",children:"Try Again"})]}),children:(0,jsx_runtime.jsx)(ErrorThrowingComponent,{shouldThrow:!0})}),parameters:{docs:{description:{story:"ErrorBoundary with a custom fallback component showing how you can provide your own error UI."}}}},Interactive={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)(ErrorTrigger,{}),parameters:{docs:{description:{story:"Interactive example - click the button to trigger an error and see the ErrorBoundary in action."}}}},MultipleChildren={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)(ErrorBoundary.tH,{children:(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Component 1: Working fine"}),(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Component 2: Also working"}),(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Component 3: Everything is good"})]})}),parameters:{docs:{description:{story:"ErrorBoundary protecting multiple child components."}}}},NestedBoundaries={args:{children:(0,jsx_runtime.jsx)("div",{children:"Placeholder"})},render:()=>(0,jsx_runtime.jsx)("div",{className:"space-y-4",children:(0,jsx_runtime.jsxs)(ErrorBoundary.tH,{children:[(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Outer boundary - this content is safe"}),(0,jsx_runtime.jsx)(ErrorBoundary.tH,{fallback:error=>(0,jsx_runtime.jsxs)("div",{className:"bg-orange-50 border border-orange-300 text-orange-700 px-4 py-3 rounded",children:[(0,jsx_runtime.jsx)("p",{className:"font-semibold",children:"Inner boundary caught error:"}),(0,jsx_runtime.jsx)("p",{className:"text-sm",children:error.message})]}),children:(0,jsx_runtime.jsx)(ErrorThrowingComponent,{shouldThrow:!0})}),(0,jsx_runtime.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 text-green-700 rounded",children:"Outer boundary - this content is still safe"})]})}),parameters:{docs:{description:{story:"Nested ErrorBoundaries showing how inner boundaries catch errors without affecting outer content."}}}},__namedExportsOrder=["Default","WithError","WithCustomFallback","Interactive","MultipleChildren","NestedBoundaries"]}}]);

Youez - 2016 - github.com/yon3zu
LinuXploit