Skip to content

Commit

Permalink
♻️ format tingz
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmnqdds committed Aug 27, 2024
1 parent 4f198c2 commit 1583ff7
Show file tree
Hide file tree
Showing 33 changed files with 4,985 additions and 95 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
8 changes: 4 additions & 4 deletions app/(home)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ export default function HomeLayout({
pathname === item.href
? "bg-gray-50 text-primary"
: "text-gray-700 hover:text-primary hover:bg-gray-50 dark:hover:bg-zinc-800",
"group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold"
"group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
)}
>
<item.icon
className={classNames(
pathname === item.href
? "text-primary"
: "text-accent group-hover:text-primary",
"h-6 w-6 shrink-0"
"h-6 w-6 shrink-0",
)}
aria-hidden="true"
/>
Expand Down Expand Up @@ -212,15 +212,15 @@ export default function HomeLayout({
pathname === item.href
? "bg-primary-foreground text-primary"
: "text-accent hover:text-primary hover:bg-accent",
"group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold"
"group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
)}
>
<item.icon
className={classNames(
pathname === item.href
? "text-primary"
: "text-accent group-hover:text-primary",
"h-6 w-6 shrink-0"
"h-6 w-6 shrink-0",
)}
aria-hidden="true"
/>
Expand Down
4 changes: 2 additions & 2 deletions app/(home)/result/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const Page = () => {
useEffect(() => {
if (session) {
const tempRemarks = result?.filter(
(result) => result.sessionName === session
(result) => result.sessionName === session,
)[0].remarks;
const tempStatus = result?.filter(
(result) => result.sessionName === session
(result) => result.sessionName === session,
)[0].status;
setNotes({
remarks: tempRemarks || "No Remarks",
Expand Down
8 changes: 0 additions & 8 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { QueryProvider } from "@/context/QueryProvider";
import { ThemeProvider } from "@/context/ThemeProvider";
import { GoogleTagManager } from "@next/third-parties/google";
import type { Metadata } from "next";
import { unstable_noStore as noStore } from "next/cache";
import { Poppins } from "next/font/google";
Expand Down Expand Up @@ -62,13 +61,6 @@ export default async function RootLayout({
data-token="09a05d6b-9ccf-4902-8ad0-e623689d586a"
async
/>
<Script
defer
src="https://eu.umami.is/script.js"
data-website-id="4f1a0eb5-2fe9-4578-badd-6777440a1f6a"
/>
<GoogleTagManager gtmId="G-FSH7NYD2CV" />

<QueryProvider>
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
{children}
Expand Down
2 changes: 0 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Footer from "@/components/sections/Footer";
import Hero from "@/components/sections/HeroSection";
import Testimonial from "@/components/sections/TestimonialSection";
import LenisSmoothScroll from "@/context/LenisProvider";
// import Script from "next/script";

export default function Home() {
return (
Expand All @@ -17,7 +16,6 @@ export default function Home() {
<Feature />
<Testimonial />
</main>
{/* <Script src="https://webkeyz.github.io/stand-with-palestine/dist/stand-with-palestine-widget.js" /> */}
<Footer />
</LenisSmoothScroll>
);
Expand Down
16 changes: 8 additions & 8 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true,
"ignore": ["/node_modules/**", "/.next/**"]
"ignore": [".next", "node_modules"]
},
"linter": {
"enabled": true,
"ignore": ["/node_modules/**", "/.next/**"],
"rules": {
"recommended": true,
"suspicious": {
Expand All @@ -18,18 +17,19 @@
"useKeyWithClickEvents": "off",
"noSvgWithoutTitle": "off"
}
}
},
"ignore": [".next", "node_modules"]
},
"formatter": {
"ignore": ["/node_modules/**", "/.next/**"],
"enabled": true,
"indentStyle": "space",
"formatWithErrors": true
"indentWidth": 2,
"formatWithErrors": true,
"ignore": [".next", "node_modules"]
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingComma": "es5"
"quoteStyle": "double"
}
}
}
3 changes: 3 additions & 0 deletions components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ImaluumLogin } from "@/lib/server/auth";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation } from "@tanstack/react-query";
import { useRouter } from "next/navigation";
import type { CSSProperties, HTMLAttributes } from "react";
import { useForm } from "react-hook-form";
import toast from "react-hot-toast";
import * as z from "zod";
Expand All @@ -30,6 +31,8 @@ const formSchema = z.object({
}),
});

type Props = {} & HTMLAttributes<HTMLFormElement> & CSSProperties;

const LoginForm = () => {
const { reset: ProfileReset, setProfile } = useProfile();
const { reset: ScheduleReset } = useSchedule();
Expand Down
18 changes: 9 additions & 9 deletions components/card-tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import * as THREE from "three";

extend({ MeshLineGeometry, MeshLineMaterial });
useGLTF.preload(
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/5huRVDzcoDwnbgrKUo1Lzs/53b6dd7d6b4ffcdbd338fa60265949e1/tag.glb"
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/5huRVDzcoDwnbgrKUo1Lzs/53b6dd7d6b4ffcdbd338fa60265949e1/tag.glb",
);
useTexture.preload(
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/SOT1hmCesOHxEYxL7vkoZ/c57b29c85912047c414311723320c16b/band.jpg"
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/SOT1hmCesOHxEYxL7vkoZ/c57b29c85912047c414311723320c16b/band.jpg",
);

export default function Tag3d() {
Expand Down Expand Up @@ -90,10 +90,10 @@ function Band({ maxSpeed = 50, minSpeed = 10 }) {
linearDamping: 2,
};
const { nodes, materials } = useGLTF(
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/5huRVDzcoDwnbgrKUo1Lzs/53b6dd7d6b4ffcdbd338fa60265949e1/tag.glb"
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/5huRVDzcoDwnbgrKUo1Lzs/53b6dd7d6b4ffcdbd338fa60265949e1/tag.glb",
);
const texture = useTexture(
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/SOT1hmCesOHxEYxL7vkoZ/c57b29c85912047c414311723320c16b/band.jpg"
"https://assets.vercel.com/image/upload/contentful/image/e5382hct74si/SOT1hmCesOHxEYxL7vkoZ/c57b29c85912047c414311723320c16b/band.jpg",
);
const { width, height } = useThree((state) => state.size);
const [curve] = useState(
Expand All @@ -103,7 +103,7 @@ function Band({ maxSpeed = 50, minSpeed = 10 }) {
new THREE.Vector3(),
new THREE.Vector3(),
new THREE.Vector3(),
])
]),
);
const [dragged, drag] = useState(false);
const [hovered, hover] = useState(false);
Expand Down Expand Up @@ -142,15 +142,15 @@ function Band({ maxSpeed = 50, minSpeed = 10 }) {
for (const ref of [j1, j2]) {
if (!ref.current.lerped)
ref.current.lerped = new THREE.Vector3().copy(
ref.current.translation()
ref.current.translation(),
);
const clampedDistance = Math.max(
0.1,
Math.min(1, ref.current.lerped.distanceTo(ref.current.translation()))
Math.min(1, ref.current.lerped.distanceTo(ref.current.translation())),
);
ref.current.lerped.lerp(
ref.current.translation(),
delta * (minSpeed + clampedDistance * (maxSpeed - minSpeed))
delta * (minSpeed + clampedDistance * (maxSpeed - minSpeed)),
);
}
// Calculate catmul curve
Expand Down Expand Up @@ -206,7 +206,7 @@ function Band({ maxSpeed = 50, minSpeed = 10 }) {
drag(
new THREE.Vector3()
.copy(e.point)
.sub(vec.copy(card.current.translation()))
.sub(vec.copy(card.current.translation())),
)
)}
>
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/CGPAChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const CGPAChart = () => {
const { result } = useResult();

const filteredResult = result?.filter(
(cgpa) => cgpa.cgpaValue && cgpa.gpaValue
(cgpa) => cgpa.cgpaValue && cgpa.gpaValue,
);

const data = filteredResult?.map((cgpa) => {
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";

const Card = ({
className = "",
Expand Down
2 changes: 1 addition & 1 deletion components/financial-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function FinancialDialog() {
!!results.result &&
results.result.length > 0 &&
results.result[0]?.remarks ===
"Please contact finance division regarding tuition fees"
"Please contact finance division regarding tuition fees",
);

return (
Expand Down
2 changes: 1 addition & 1 deletion components/schedule/TimetableEventBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function TimetableEventBlock({
type="button"
className={cn(
"absolute rounded-md duration-100 p-1 border md:border-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
[event.color]
[event.color],
)}
style={{
top,
Expand Down
4 changes: 2 additions & 2 deletions components/schedule/TimetableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ export default function TimetableModal({
</span>
{moment(
currentSubject?.timestamps.start,
"HH:mm:ss"
"HH:mm:ss",
).format("h:mma")}{" "}
-{" "}
{moment(
currentSubject?.timestamps.end,
"HH:mm:ss"
"HH:mm:ss",
).format("h:mma")}
</p>
<p className="text-sm text-foreground">
Expand Down
2 changes: 1 addition & 1 deletion components/sections/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import { JSX, SVGProps } from "react";
import type { JSX, SVGProps } from "react";

const navigation = {
social: [
Expand Down
6 changes: 3 additions & 3 deletions components/sections/TestimonialSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ const Testimonial = () => {
key={columnIdx}
className={classNames(
(columnGroupIdx === 0 && columnIdx === 0) ||
(columnGroupIdx === testimonials.length - 1 &&
columnIdx === columnGroup.length - 1)
(columnGroupIdx === testimonials.length - 1 &&
columnIdx === columnGroup.length - 1)
? "xl:row-span-2"
: "xl:row-start-1",
"space-y-8"
"space-y-8",
)}
>
{column.map((testimonial) => (
Expand Down
4 changes: 2 additions & 2 deletions components/ui/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Avatar = React.forwardRef<
ref={ref}
className={cn(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
className
className,
)}
{...props}
/>
Expand All @@ -40,7 +40,7 @@ const AvatarFallback = React.forwardRef<
ref={ref}
className={cn(
"flex h-full w-full items-center justify-center rounded-full bg-muted",
className
className,
)}
{...props}
/>
Expand Down
4 changes: 2 additions & 2 deletions components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
}
},
);

export interface ButtonProps
Expand All @@ -49,7 +49,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
{...props}
/>
);
}
},
);
Button.displayName = "Button";

Expand Down
2 changes: 1 addition & 1 deletion components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Checkbox = React.forwardRef<
ref={ref}
className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
className
className,
)}
{...props}
>
Expand Down
14 changes: 7 additions & 7 deletions components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className
className,
)}
{...props}
>
Expand All @@ -48,7 +48,7 @@ const DropdownMenuSubContent = React.forwardRef<
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
className,
)}
{...props}
/>
Expand All @@ -66,7 +66,7 @@ const DropdownMenuContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
className,
)}
{...props}
/>
Expand All @@ -85,7 +85,7 @@ const DropdownMenuItem = React.forwardRef<
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className
className,
)}
{...props}
/>
Expand All @@ -100,7 +100,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
className,
)}
checked={checked}
{...props}
Expand All @@ -124,7 +124,7 @@ const DropdownMenuRadioItem = React.forwardRef<
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
className,
)}
{...props}
>
Expand All @@ -149,7 +149,7 @@ const DropdownMenuLabel = React.forwardRef<
className={cn(
"px-2 py-1.5 text-sm font-semibold",
inset && "pl-8",
className
className,
)}
{...props}
/>
Expand Down
Loading

0 comments on commit 1583ff7

Please sign in to comment.