chore: format files using prettier (#7364)

* chore: format files using prettier

* chore: api server files formatted
This commit is contained in:
sriram veeraghanta 2025-07-08 20:41:11 +05:30 committed by GitHub
parent 0225d806cc
commit 6ce700fd5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
149 changed files with 1518 additions and 919 deletions

View file

@ -1,9 +1,6 @@
import { start, done } from 'nprogress';
import {
AppProgressBar as AppProgressBarComponent,
useRouter,
} from './AppProgressBar';
import withSuspense from './withSuspense';
import { start, done } from "nprogress";
import { AppProgressBar as AppProgressBarComponent, useRouter } from "./AppProgressBar";
import withSuspense from "./withSuspense";
export interface NProgressOptions {
minimum?: number;

View file

@ -1,16 +1,13 @@
export function isSameURL(target: URL, current: URL) {
const cleanTarget =
target.protocol + '//' + target.host + target.pathname + target.search;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname + current.search;
const cleanTarget = target.protocol + "//" + target.host + target.pathname + target.search;
const cleanCurrent = current.protocol + "//" + current.host + current.pathname + current.search;
return cleanTarget === cleanCurrent;
}
export function isSameURLWithoutSearch(target: URL, current: URL) {
const cleanTarget = target.protocol + '//' + target.host + target.pathname;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname;
const cleanTarget = target.protocol + "//" + target.host + target.pathname;
const cleanCurrent = current.protocol + "//" + current.host + current.pathname;
return cleanTarget === cleanCurrent;
}

View file

@ -1,9 +1,9 @@
'use client'
"use client";
import { useEffect } from "react";
import { usePathname, useSearchParams } from "next/navigation";
// posthog
import { usePostHog } from 'posthog-js/react';
import { usePostHog } from "posthog-js/react";
export default function PostHogPageView(): null {
const pathname = usePathname();
@ -12,18 +12,15 @@ export default function PostHogPageView(): null {
useEffect(() => {
// Track pageviews
if (pathname && posthog) {
let url = window.origin + pathname
let url = window.origin + pathname;
if (searchParams.toString()) {
url = url + `?${searchParams.toString()}`
url = url + `?${searchParams.toString()}`;
}
posthog.capture(
'$pageview',
{
'$current_url': url,
}
)
posthog.capture("$pageview", {
$current_url: url,
});
}
}, [pathname, searchParams, posthog])
}, [pathname, searchParams, posthog]);
return null
return null;
}

View file

@ -17,4 +17,6 @@ const initializeStore = () => {
export const store = initializeStore();
export const StoreProvider = ({ children }: { children: ReactElement }) => <StoreContext.Provider value={store}>{children}</StoreContext.Provider>;
export const StoreProvider = ({ children }: { children: ReactElement }) => (
<StoreContext.Provider value={store}>{children}</StoreContext.Provider>
);