Skip to content

Commit 9ab1964

Browse files
committed
A bit easier to read.
1 parent 45ea112 commit 9ab1964

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/playground/playground.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type Mode = keyof typeof MODES
1414

1515
const App = () => {
1616
const [activeComponent, setActiveComponent] = useState<Mode>('claude')
17+
const ModeComponent = MODES[activeComponent].component
1718

1819
return (
1920
<div className='min-h-screen bg-slate-100'>
@@ -43,10 +44,7 @@ const App = () => {
4344
</div>
4445

4546
<div className='popup-frame'>
46-
{(() => {
47-
const Component = MODES[activeComponent].component
48-
return <Component />
49-
})()}
47+
<ModeComponent />
5048
</div>
5149
</div>
5250
</div>

0 commit comments

Comments
 (0)