MCPcopy Create free account
hub / github.com/epicweb-dev/react-suspense / ShipFallback

Function ShipFallback

exercises/02.dynamic/03.problem.flash/index.tsx:102–130  ·  view source on GitHub ↗
({ shipName }: { shipName: string })

Source from the content-addressed store, hash-verified

100}
101
102function ShipFallback({ shipName }: { shipName: string }) {
103 return (
104 <div className="ship-info">
105 <div className="ship-info__img-wrapper">
106 <img src="/img/fallback-ship.png" alt={shipName} />
107 </div>
108 <section>
109 <h2>
110 {shipName}
111 <sup>
112 XX <small>lyh</small>
113 </sup>
114 </h2>
115 </section>
116 <section>
117 <ul>
118 {Array.from({ length: 3 }).map((_, i) => (
119 <li key={i}>
120 <label>loading</label>:{' '}
121 <span>
122 XX <small>(loading)</small>
123 </span>
124 </li>
125 ))}
126 </ul>
127 </section>
128 </div>
129 )
130}
131
132function ShipError({ shipName }: { shipName: string }) {
133 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected