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

Function ShipFallback

exercises/04.image/02.solution.error/index.tsx:100–128  ·  view source on GitHub ↗
({ shipName }: { shipName: string })

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected