diff options
| author | Max Nanis | 2025-06-23 17:20:31 +0700 |
|---|---|---|
| committer | Max Nanis | 2025-06-23 17:20:31 +0700 |
| commit | 8138549f64403874eb7c7ddfbde1cc2cc2c03695 (patch) | |
| tree | ff16ff5bf7b0a5454fd181d178a6f799b9141d64 /src/components | |
| parent | 5e8b1b89bfffd0202bc6c5f64aac943053d79d32 (diff) | |
| download | panel-ui-8138549f64403874eb7c7ddfbde1cc2cc2c03695.tar.gz panel-ui-8138549f64403874eb7c7ddfbde1cc2cc2c03695.zip | |
Typescript validation finally passes.
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/app-sidebar.tsx | 8 | ||||
| -rw-r--r-- | src/components/site-header.tsx | 6 | ||||
| -rw-r--r-- | src/components/ui/sheet.tsx | 5 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 9a13aff..c60bf17 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import React from "react" import {CircleDollarSign, SquareStack} from "lucide-react" import {NavMain} from "@/components/nav-main" @@ -14,9 +14,9 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, - useSidebar, } from "@/components/ui/sidebar" import {useAppDispatch, useAppSelector} from "@/hooks.ts"; +import {App} from "@/models/app.ts" import {setPage} from "@/models/appSlice.ts"; import {Badge} from "@/components/ui/badge.tsx"; import {useSelector} from "react-redux"; @@ -24,13 +24,11 @@ import {selectCashoutMethods} from "@/models/cashoutMethodSlice.ts"; import {selectTransactionHistory} from "@/models/transactionHistorySlice.ts"; export function AppSidebar({...props}: React.ComponentProps<typeof Sidebar>) { - const app = useAppSelector(state => state.app) + const app: App = useAppSelector(state => state.app) const dispatch = useAppDispatch() const cashoutMethods = useSelector(selectCashoutMethods) const transactionHistory = useSelector(selectTransactionHistory) - const {isMobile} = useSidebar() - return ( <Sidebar collapsible="offcanvas" {...props}> <SidebarHeader> diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx index 25b3e52..dca4996 100644 --- a/src/components/site-header.tsx +++ b/src/components/site-header.tsx @@ -1,11 +1,11 @@ import {Separator} from "@/components/ui/separator" import {SidebarTrigger} from "@/components/ui/sidebar" -import React from "react"; import {useAppSelector} from "@/hooks.ts"; +import {App} from "@/models/app.ts" import {Offerwall} from "@/pages/Offerwall.tsx"; const SiteHeader = () => { - const app = useAppSelector(state => state.app) + const app: App = useAppSelector(state => state.app) return ( <header @@ -22,7 +22,7 @@ const SiteHeader = () => { {app.currentPage === 'questions' && "Profiling Questions"} {app.currentPage === 'demographics' && "User Demographics"} {app.currentPage === 'task_attempts' && "Task Attempts"} - {app.currentPage === 'cashouts' && "Cashout Methods"} + {app.currentPage === 'cashout_methods' && "Cashout Methods"} {app.currentPage === 'transaction_history' && 'Transaction History'} </h1> diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index 6906f5b..c142665 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -58,8 +58,9 @@ function SheetContent({ className={cn( "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && - "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", - side === "left" && + // "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", + "inset-y-0 right-0 h-full w-1/2 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right", + side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", |
