Files
supabase/apps/database-new/components/Header/ToggleCodeEditorButton.tsx
Terry Sutton 4c20bb0d52 Chore/db visualizer 3 (#19177)
* Midway doing something

* Small refactor

* Some mobile responsiveness

* bit fix

* Update name

* One more name

* One more name, again

* Footer and faqs

* Fix

* Style fixes

* Style fixes

* Add titles

* Add CTAs to copy, download or load SQL in supabase

* Styling

* mobile

* Add suggestions

* Add delete action

* Cleanup

* Add delete thread and edit thread modals

* Restore server action

* Fix build error

* Import common theme switcher

* Add file

* Restore thread list

* force revalidating profile path

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-11-24 13:48:14 +08:00

14 lines
352 B
TypeScript

import { useAppStateSnapshot } from '@/lib/state'
import { Button } from 'ui'
const ToggleCodeEditorButton = () => {
const snap = useAppStateSnapshot()
return (
<Button type="default" onClick={() => snap.setHideCode(!snap.hideCode)}>
{snap.hideCode ? 'Show code' : 'Hide code'}
</Button>
)
}
export default ToggleCodeEditorButton