Skip to content

Commit

Permalink
Change order of tasks
Browse files Browse the repository at this point in the history
- small ui fixes
  • Loading branch information
samchuk-vlad committed Jul 24, 2024
1 parent bb0dbca commit 8c91a2e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/components/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type TabsProps = ComponentProps<'div'> & {
tabClassName?: ((selected: boolean) => string) | string
defaultTab?: number
withHashIntegration?: boolean
containerClassName?: string
hideBeforeHashLoaded?: boolean
manualTabControl?: {
selectedTab: number
Expand All @@ -33,6 +34,7 @@ export default function Tabs({
panelClassName,
tabsRightElement,
tabClassName,
containerClassName,
defaultTab = 0,
hideBeforeHashLoaded,
withHashIntegration = true,
Expand Down Expand Up @@ -140,7 +142,9 @@ export default function Tabs({
</Tab.List>
<Tab.Panels as={component} className={cx('mt-2', panelClassName)}>
{tabs.map(({ id, content }) => (
<Tab.Panel key={id}>{content(changeTab)}</Tab.Panel>
<Tab.Panel className={containerClassName} key={id}>
{content(changeTab)}
</Tab.Panel>
))}
{usedSelectedTab === -1 && <Tab.Panel key='empty' />}
</Tab.Panels>
Expand Down
9 changes: 5 additions & 4 deletions src/modules/telegram/FriendsPage/LeaderboardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const LeaderboardModalContent = () => {
id: 'contest',
text: 'Contest',
content: () => (
<div className='flex flex-col gap-4'>
<div className='flex h-full flex-col gap-4'>
<span className='text-sm text-slate-400'>
Top 10 users who invite the most friends during the week will be
rewarded.{' '}
Expand All @@ -103,7 +103,7 @@ const LeaderboardModalContent = () => {
id: 'allTime',
text: 'All-Time',
content: () => (
<div className='flex flex-col gap-4'>
<div className='flex h-full flex-col gap-4'>
<span className='text-sm text-slate-400'>
All users who invite the most friends.
</span>
Expand All @@ -117,7 +117,8 @@ const LeaderboardModalContent = () => {
<div className='flex h-full w-full flex-col gap-4'>
<Tabs
className='rounded-full bg-slate-900 p-[2px]'
panelClassName='mt-0 w-full max-w-full px-0 z-0'
panelClassName='mt-0 w-full h-full max-w-full px-0 z-0'
containerClassName='h-full'
tabClassName={(selected) =>
cx(
{
Expand Down Expand Up @@ -214,7 +215,7 @@ const LeaderboardTable = ({ isContest }: LeaderboardTableProps) => {
<Loading title='Loading table data' className='p-7' />
) : (
<div
className='flex flex-col items-center justify-center p-4 text-center'
className='flex h-full flex-col items-center justify-center p-4 text-center'
style={{ gridColumn: '1/4' }}
>
<Image
Expand Down
2 changes: 1 addition & 1 deletion src/modules/telegram/FriendsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const FriendsPageContent = () => {
<Button
size='lg'
variant={'bgLighter'}
className='h-full bg-slate-700 px-4 text-white'
className='flex h-[48px] min-w-[48px] items-center justify-center bg-slate-700 p-0 text-white'
onClick={() => onCopyClick(referralLink)}
>
{isCopied ? <MdCheck /> : <MdOutlineContentCopy />}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/telegram/TasksPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default function TasksPage() {
className='sticky top-0'
/>
<div className='flex flex-1 flex-col gap-8 overflow-auto px-4 py-8'>
<BasicTasks />
<DailyTasks />
<InviteFriendsTasks />
<DailyTasks />
<BasicTasks />
<NewTasks />
</div>
</LayoutWithBottomNavigation>
Expand Down

0 comments on commit 8c91a2e

Please sign in to comment.