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

Function ShipFallback

exercises/02.dynamic/01.problem.cache/index.tsx:96–124  ·  view source on GitHub ↗
({ shipName }: { shipName: string })

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected