Skip to content

Commit

Permalink
Merge pull request #19 from muntaxir4/dev
Browse files Browse the repository at this point in the history
fix: Web ui issues
  • Loading branch information
muntaxir4 authored Sep 13, 2024
2 parents 07eeebb + 8da0ca8 commit 0154854
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 19 deletions.
14 changes: 5 additions & 9 deletions apps/user-web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import { Inter } from "next/font/google";
import "./globals.css";
import Providers from "./providers";
import GoogleAnalytics from "@/components/GoogleAnalytics";

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});

export const metadata: Metadata = {
Expand All @@ -26,7 +22,7 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning>
<GoogleAnalytics />
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<body className={`${inter.variable}`}>
<Providers>{children}</Providers>
</body>
</html>
Expand Down
3 changes: 2 additions & 1 deletion apps/user-web/components/ac/features-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useTheme } from "next-themes";
export function FeaturesSectionDemo() {
const features = [
{
title: "Transfer page",
title: "User page",
description: "Interact and pay with ease.",
skeleton: <SkeletonOne />,
className:
Expand Down Expand Up @@ -167,6 +167,7 @@ export const Globe = ({ className }: { className?: string }) => {
{ location: [20.5937, 78.9629], size: 0.15 },
{ location: [51.5074, -0.1278], size: 0.08 },
{ location: [35.6895, 139.6917], size: 0.06 },
{ location: [25.2048, 55.2708], size: 0.1 },
],
onRender: (state) => {
// Called on every animation frame.
Expand Down
4 changes: 2 additions & 2 deletions apps/user-web/components/app/BalancePieChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function BalancePieChart({
<div className="h-full">
<ChartContainer
config={chartConfig}
className="mx-auto aspect-square"
className="mx-auto aspect-square min-h-48"
>
<PieChart>
<ChartTooltip
Expand All @@ -84,7 +84,7 @@ export default function BalancePieChart({
<Pie data={chartData} dataKey="amount" />
<ChartLegend
content={<ChartLegendContent nameKey="txType" />}
className="-translate-y-3 flex-wrap gap-2 [&>*]:basis-1/4 [&>*]:justify-center text-base"
className="-translate-y-3 flex-wrap gap-2 [&>*]:basis-1/4 [&>*]:justify-center text-sm"
/>
</PieChart>
</ChartContainer>
Expand Down
14 changes: 12 additions & 2 deletions apps/user-web/components/app/SlideConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ export default function SlideConfirm({
};

const handleDragEnd = () => {
console.log(
"End",
moveX,
(document.querySelector<HTMLDivElement>(".drag-container")?.offsetWidth ??
0) -
(document.querySelector<HTMLDivElement>(".drag-button")?.offsetWidth ??
0)
);
if (
moveX + 1.5 <
moveX + 3 <
(document.querySelector<HTMLDivElement>(".drag-container")?.offsetWidth ??
0) -
(document.querySelector<HTMLDivElement>(".drag-button")?.offsetWidth ??
Expand All @@ -49,6 +57,7 @@ export default function SlideConfirm({
setMoveX(0); // Reset if not dragged to the end
setConfirmed(false);
} else {
console.log("Submitted");
document.querySelector<HTMLButtonElement>(".drag-submit")?.click();
setOpen?.(false);
// setTimeout(() => {
Expand Down Expand Up @@ -78,8 +87,9 @@ export default function SlideConfirm({
onTouchMove={handleTouchMove}
onTouchEnd={handleDragEnd}
>
<p className="opacity-10 text-sm mx-auto">Slide</p>
<div
className="drag-button flex justify-center items-center font-semibold absolute w-24 p-2 h-full bg-green-600 rounded-full transition-[left_0.2s_ease] cursor-grab active:cursor-grabbing text-white"
className="drag-button flex justify-center items-center font-semibold absolute w-24 p-2 h-full bg-green-600 rounded-full cursor-grab active:cursor-grabbing text-white"
style={{ left: `${moveX}px` }}
onMouseDown={handleMouseDown}
onTouchStart={handleTouchStart}
Expand Down
5 changes: 4 additions & 1 deletion apps/user-web/components/app/chat/MessengerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ function Message({
{msgObj.isPayment ? (
<p className="text-2xl font-medium text-center p-4">
{`${curreny.symbol}` +
getCurrencyFloatAmount(Number(msgObj.message), curreny.rate)}
getCurrencyFloatAmount(
Number(msgObj.message) / 100,
curreny.rate
)}
</p>
) : (
<p className="mt-1 mx-3">{msgObj.message}</p>
Expand Down
4 changes: 2 additions & 2 deletions apps/user-web/components/app/transfer/TransferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function TransferForm({
}) {
const { toast } = useToast();
const setIsRefetch = useSetRecoilState(userRefetchState);
const currencyId = useRecoilValue(currencyState).id;
const { id: currencyId, symbol } = useRecoilValue(currencyState);
const currency = Object.entries(currencies).find(
([curr, value]) => value.id === currencyId
)?.[0];
Expand All @@ -34,7 +34,7 @@ export default function TransferForm({
{ withCredentials: true }
);
toast({
title: `Sent successfully $${form.amount.value}`,
title: `Sent successfully ${symbol}${form.amount.value}`,
duration: 3000,
});
setIsRefetch((prev) => !prev);
Expand Down
2 changes: 1 addition & 1 deletion apps/user-web/components/auth/Signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Signin() {
<img
src="https://www.vectorlogo.zone/logos/google/google-ar21.svg"
alt="Google Logo"
className="w-fit h-8 mx-2"
className="w-16 h-8 mx-2"
/>
</Button>
</GoogleSignin>
Expand Down
2 changes: 1 addition & 1 deletion apps/user-web/components/auth/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function Signup() {
<img
src="https://www.vectorlogo.zone/logos/google/google-ar21.svg"
alt="Google Logo"
className="w-fit h-8 mx-2"
className="w-16 h-8 mx-2"
/>
</Button>
</GoogleSignin>
Expand Down

0 comments on commit 0154854

Please sign in to comment.