Skip to content

Commit

Permalink
fix (sing): workaround drawer layout shift with mobile keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
glencoden committed Jan 17, 2025
1 parent d3ce1f0 commit 4f28680
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions apps/cloud/app/components/SessionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Session } from '@repo/db'
import Button from '@repo/ui/components/Button'
import Spinner from '@repo/ui/components/Spinner'
import { cn } from '@repo/ui/helpers'
import Subtitle2 from '@repo/ui/typography/Subtitle2'
import { CircleDollarSign, House, Lock, LockOpen, Star } from 'lucide-react'

export default function SessionMenu({
Expand Down Expand Up @@ -118,6 +119,9 @@ export default function SessionMenu({

<section className='flex items-center gap-7'>
{isPending && <Spinner light />}
{session.isDemo && !isPending && (
<Subtitle2 className='text-pink-700'>Demo</Subtitle2>
)}

<Button asChild variant='ghost' size='icon'>
<Link to='/'>
Expand Down
6 changes: 2 additions & 4 deletions apps/sing/app/routes/($guestId).tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { useEffect, useMemo, useRef, useState } from 'react'
import { useIntl } from 'react-intl'
import { Drawer } from 'vaul'

type NavigationPage = 'songs' | 'feedback' | 'tip'

type LoaderResponse = {
guest: Guest | null
session: Session | null
Expand Down Expand Up @@ -87,7 +85,7 @@ export default function Index() {
*/

const pages = useMemo(() => {
return ['songs', 'feedback']
return ['songs']
// const navigationPages: NavigationPage[] = ['songs', 'feedback', 'tip']
// if (session?.hideTipCollection) {
// return navigationPages.filter((page) => page !== 'tip')
Expand Down Expand Up @@ -184,7 +182,7 @@ export default function Index() {
</H4>
)}
<Link
to={`${base}/create/${id}`}
to={`/create/${guest!.id}/${id}`}
className='flex items-center gap-3'
>
<Star
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function Create() {
}

return (
<Form method='post' className='mb-16 mt-7 flex flex-col gap-3'>
<Form method='post' className='mx-6 mb-16 mt-7 flex flex-col gap-3'>
<H3 className='mb-10 leading-10'>
{intl.formatMessage(
{
Expand Down

0 comments on commit 4f28680

Please sign in to comment.