File tree Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function App() {
1111 delay : 300 ,
1212 minDuration : 350 ,
1313 } )
14- const [ optimistiShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
14+ const [ optimisticShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
1515
1616 function handleShipSelection ( newShipName : string ) {
1717 startTransition ( ( ) => {
@@ -26,7 +26,7 @@ function App() {
2626 < div className = "details" style = { { opacity : isPending ? 0.6 : 1 } } >
2727 < ErrorBoundary fallback = { < ShipError shipName = { shipName } /> } >
2828 < Suspense fallback = { < ShipFallback shipName = { shipName } /> } >
29- < ShipDetails shipName = { shipName } optimistiShip = { optimistiShip } />
29+ < ShipDetails shipName = { shipName } optimisticShip = { optimisticShip } />
3030 </ Suspense >
3131 </ ErrorBoundary >
3232 </ div >
@@ -139,14 +139,14 @@ function ShipButtons({
139139
140140function ShipDetails ( {
141141 shipName,
142- optimistiShip ,
142+ optimisticShip ,
143143} : {
144144 shipName : string
145- optimistiShip : Ship | null
145+ optimisticShip : Ship | null
146146} ) {
147147 // 🦉 you can change this delay to control how long loading the resource takes:
148148 const delay = 2000
149- const ship = optimistiShip ?? use ( getShip ( shipName , delay ) )
149+ const ship = optimisticShip ?? use ( getShip ( shipName , delay ) )
150150 return (
151151 < div className = "ship-info" >
152152 < div className = "ship-info__img-wrapper" >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function App() {
1111 delay : 300 ,
1212 minDuration : 350 ,
1313 } )
14- const [ optimistiShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
14+ const [ optimisticShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
1515
1616 function handleShipSelection ( newShipName : string ) {
1717 startTransition ( ( ) => {
@@ -26,7 +26,7 @@ function App() {
2626 < div className = "details" style = { { opacity : isPending ? 0.6 : 1 } } >
2727 < ErrorBoundary fallback = { < ShipError shipName = { shipName } /> } >
2828 < Suspense fallback = { < ShipFallback shipName = { shipName } /> } >
29- < ShipDetails shipName = { shipName } optimistiShip = { optimistiShip } />
29+ < ShipDetails shipName = { shipName } optimisticShip = { optimisticShip } />
3030 </ Suspense >
3131 </ ErrorBoundary >
3232 </ div >
@@ -143,14 +143,14 @@ function ShipButtons({
143143
144144function ShipDetails ( {
145145 shipName,
146- optimistiShip ,
146+ optimisticShip ,
147147} : {
148148 shipName : string
149- optimistiShip : Ship | null
149+ optimisticShip : Ship | null
150150} ) {
151151 // 🦉 you can change this delay to control how long loading the resource takes:
152152 const delay = 2000
153- const ship = optimistiShip ?? use ( getShip ( shipName , delay ) )
153+ const ship = optimisticShip ?? use ( getShip ( shipName , delay ) )
154154 return (
155155 < div className = "ship-info" >
156156 < div className = "ship-info__img-wrapper" >
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function App() {
1212 delay : 300 ,
1313 minDuration : 350 ,
1414 } )
15- const [ optimistiShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
15+ const [ optimisticShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
1616
1717 function handleShipSelection ( newShipName : string ) {
1818 startTransition ( ( ) => {
@@ -27,7 +27,7 @@ function App() {
2727 < div className = "details" style = { { opacity : isPending ? 0.6 : 1 } } >
2828 < ErrorBoundary fallback = { < ShipError shipName = { shipName } /> } >
2929 < Suspense fallback = { < ShipFallback shipName = { shipName } /> } >
30- < ShipDetails shipName = { shipName } optimistiShip = { optimistiShip } />
30+ < ShipDetails shipName = { shipName } optimisticShip = { optimisticShip } />
3131 </ Suspense >
3232 </ ErrorBoundary >
3333 </ div >
@@ -149,14 +149,14 @@ function ShipButtons({
149149
150150function ShipDetails ( {
151151 shipName,
152- optimistiShip ,
152+ optimisticShip ,
153153} : {
154154 shipName : string
155- optimistiShip : Ship | null
155+ optimisticShip : Ship | null
156156} ) {
157157 // 🦉 you can change this delay to control how long loading the resource takes:
158158 const delay = 2000
159- const ship = optimistiShip ?? use ( getShip ( shipName , delay ) )
159+ const ship = optimisticShip ?? use ( getShip ( shipName , delay ) )
160160 return (
161161 < div className = "ship-info" >
162162 < div className = "ship-info__img-wrapper" >
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function App() {
1212 delay : 300 ,
1313 minDuration : 350 ,
1414 } )
15- const [ optimistiShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
15+ const [ optimisticShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
1616
1717 function handleShipSelection ( newShipName : string ) {
1818 startTransition ( ( ) => {
@@ -27,7 +27,7 @@ function App() {
2727 < div className = "details" style = { { opacity : isPending ? 0.6 : 1 } } >
2828 < ErrorBoundary fallback = { < ShipError shipName = { shipName } /> } >
2929 < Suspense fallback = { < ShipFallback shipName = { shipName } /> } >
30- < ShipDetails shipName = { shipName } optimistiShip = { optimistiShip } />
30+ < ShipDetails shipName = { shipName } optimisticShip = { optimisticShip } />
3131 </ Suspense >
3232 </ ErrorBoundary >
3333 </ div >
@@ -157,14 +157,14 @@ function ShipButtons({
157157
158158function ShipDetails ( {
159159 shipName,
160- optimistiShip ,
160+ optimisticShip ,
161161} : {
162162 shipName : string
163- optimistiShip : Ship | null
163+ optimisticShip : Ship | null
164164} ) {
165165 // 🦉 you can change this delay to control how long loading the resource takes:
166166 const delay = 2000
167- const ship = optimistiShip ?? use ( getShip ( shipName , delay ) )
167+ const ship = optimisticShip ?? use ( getShip ( shipName , delay ) )
168168 return (
169169 < div className = "ship-info" >
170170 < div className = "ship-info__img-wrapper" >
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function App() {
1212 delay : 300 ,
1313 minDuration : 350 ,
1414 } )
15- const [ optimistiShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
15+ const [ optimisticShip , setOptimisticShip ] = useOptimistic < Ship | null > ( null )
1616
1717 function handleShipSelection ( newShipName : string ) {
1818 startTransition ( ( ) => {
@@ -27,7 +27,7 @@ function App() {
2727 < div className = "details" style = { { opacity : isPending ? 0.6 : 1 } } >
2828 < ErrorBoundary fallback = { < ShipError shipName = { shipName } /> } >
2929 < Suspense fallback = { < ShipFallback shipName = { shipName } /> } >
30- < ShipDetails shipName = { shipName } optimistiShip = { optimistiShip } />
30+ < ShipDetails shipName = { shipName } optimisticShip = { optimisticShip } />
3131 </ Suspense >
3232 </ ErrorBoundary >
3333 </ div >
@@ -153,14 +153,14 @@ function ShipButtons({
153153
154154function ShipDetails ( {
155155 shipName,
156- optimistiShip ,
156+ optimisticShip ,
157157} : {
158158 shipName : string
159- optimistiShip : Ship | null
159+ optimisticShip : Ship | null
160160} ) {
161161 // 🦉 you can change this delay to control how long loading the resource takes:
162162 const delay = 2000
163- const ship = optimistiShip ?? use ( getShip ( shipName , delay ) )
163+ const ship = optimisticShip ?? use ( getShip ( shipName , delay ) )
164164 return (
165165 < div className = "ship-info" >
166166 < div className = "ship-info__img-wrapper" >
You can’t perform that action at this time.
0 commit comments