Compare commits
No commits in common. "cd8a8d746d21b26d54dfbb6fd1e62dc320b7e353" and "b1823f52943e6bdacfbc53499ca116376ee89f3e" have entirely different histories.
cd8a8d746d
...
b1823f5294
@ -1,9 +0,0 @@
|
||||
import type { CapacitorConfig } from "@capacitor/cli";
|
||||
|
||||
const config: CapacitorConfig = {
|
||||
appId: "bettersplit.shrt.solutions",
|
||||
appName: "bettersplit",
|
||||
webDir: "out",
|
||||
};
|
||||
|
||||
export default config;
|
||||
@ -3,16 +3,8 @@
|
||||
* for Docker builds.
|
||||
*/
|
||||
import "./src/env.js";
|
||||
import pwa from "next-pwa";
|
||||
import { env } from "./src/env.js";
|
||||
|
||||
const withPWA = pwa({
|
||||
dest: "public",
|
||||
disable: env.NODE_ENV === "development",
|
||||
register: true, // register the PWA service worker
|
||||
skipWaiting: true,
|
||||
});
|
||||
/** @type {import("next").NextConfig} */
|
||||
const config = {};
|
||||
|
||||
export default withPWA({
|
||||
eslint: { ignoreDuringBuilds: true },
|
||||
});
|
||||
export default config;
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"export": "next export",
|
||||
"check": "biome check .",
|
||||
"check:unsafe": "biome check --write --unsafe .",
|
||||
"check:write": "biome check --write .",
|
||||
@ -16,13 +15,10 @@
|
||||
"dev": "next dev --turbo",
|
||||
"preview": "next build && next start",
|
||||
"start": "next start",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"android": "pnpm build && pnpm export && pnpm dlx cap sync android && pnpm dlx cap open android"
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@auth/drizzle-adapter": "^1.7.2",
|
||||
"@capacitor/cli": "^7.2.0",
|
||||
"@capacitor/core": "^7.2.0",
|
||||
"@hookform/resolvers": "^5.0.1",
|
||||
"@paralleldrive/cuid2": "^2.2.2",
|
||||
"@radix-ui/react-avatar": "^1.1.3",
|
||||
@ -39,7 +35,6 @@
|
||||
"@trpc/client": "^11.0.0",
|
||||
"@trpc/react-query": "^11.0.0",
|
||||
"@trpc/server": "^11.0.0",
|
||||
"@types/next-pwa": "^5.6.9",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.1.1",
|
||||
@ -47,7 +42,6 @@
|
||||
"lucide-react": "^0.487.0",
|
||||
"next": "^15.2.3",
|
||||
"next-auth": "5.0.0-beta.25",
|
||||
"next-pwa": "^5.6.0",
|
||||
"next-themes": "^0.4.6",
|
||||
"postgres": "^3.4.4",
|
||||
"react": "^19.0.0",
|
||||
|
||||
4946
pnpm-lock.yaml
generated
4946
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@ type AppConfig = {
|
||||
};
|
||||
|
||||
export const appConfig: AppConfig = {
|
||||
name: "Bettesplit",
|
||||
name: "Betterwise",
|
||||
navigator: [
|
||||
{
|
||||
name: "Home",
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import AddFriendDrawer from "@/app/_components/friend/add-friend-drawer";
|
||||
import FriendList from "@/app/_components/friend/friend-list";
|
||||
import Header from "@/components/header";
|
||||
import { auth } from "@/server/auth";
|
||||
import { api, HydrateClient } from "@/trpc/server";
|
||||
import React from "react";
|
||||
|
||||
export default async function Page() {
|
||||
const session = await auth();
|
||||
if (session?.user) void api.friend.getAll.prefetch();
|
||||
void api.friend.getAll.prefetch();
|
||||
|
||||
return (
|
||||
<HydrateClient>
|
||||
|
||||
@ -4,14 +4,13 @@ import React from "react";
|
||||
export default function FriendRequestButton({}: {}) {
|
||||
return (
|
||||
<div>
|
||||
{/* <Button
|
||||
<Button
|
||||
variant={requestedBy === "me" ? "destructive" : "outline"}
|
||||
className="ml-auto"
|
||||
size="sm"
|
||||
>
|
||||
{requestedBy === "me" ? "Cancel" : "Accept"}
|
||||
</Button> */}
|
||||
friendRequestButton
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
// "use client";
|
||||
// import React, { useEffect, useState } from "react";
|
||||
// export function usePwaInstallStatus() {
|
||||
// const [isStandalone, setIsStandalone] = useState(false);
|
||||
// const [isIOS, setIsIOS] = useState(false);
|
||||
// const [isAndroid, setIsAndroid] = useState(false);
|
||||
|
||||
// useEffect(() => {
|
||||
// const userAgent =
|
||||
// navigator.userAgent || navigator.vendor || (window as any).opera;
|
||||
|
||||
// // iOS detection
|
||||
// const iOS = /iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream;
|
||||
// setIsIOS(iOS);
|
||||
|
||||
// // Android detection
|
||||
// const android = /android/i.test(userAgent);
|
||||
// setIsAndroid(android);
|
||||
|
||||
// // PWA "standalone" mode detection (works for both iOS & Android)
|
||||
// const isInStandaloneMode =
|
||||
// window.matchMedia("(display-mode: standalone)").matches ||
|
||||
// (navigator as any).standalone === true; // for iOS Safari
|
||||
|
||||
// setIsStandalone(isInStandaloneMode);
|
||||
// }, []);
|
||||
|
||||
// return { isIOS, isAndroid, isStandalone };
|
||||
// }
|
||||
|
||||
// function InstallPrompt() {
|
||||
// const { isIOS, isAndroid, isStandalone } = usePwaInstallStatus();
|
||||
// const [deferredPrompt, setDeferredPrompt] = useState<any>(null);
|
||||
|
||||
// useEffect(() => {
|
||||
// const handler = (e: any) => {
|
||||
// e.preventDefault();
|
||||
// setDeferredPrompt(e);
|
||||
// };
|
||||
|
||||
// window.addEventListener("beforeinstallprompt", handler);
|
||||
|
||||
// return () => {
|
||||
// window.removeEventListener("beforeinstallprompt", handler);
|
||||
// };
|
||||
// }, []);
|
||||
|
||||
// const handleInstallClick = () => {
|
||||
// console.log("install clicked");
|
||||
|
||||
// if (deferredPrompt) {
|
||||
// deferredPrompt.prompt();
|
||||
// deferredPrompt.userChoice.then((choiceResult: any) => {
|
||||
// if (choiceResult.outcome === "accepted") {
|
||||
// console.log("User accepted the A2HS prompt");
|
||||
// } else {
|
||||
// console.log("User dismissed the A2HS prompt");
|
||||
// }
|
||||
// setDeferredPrompt(null);
|
||||
// });
|
||||
// }
|
||||
// };
|
||||
// if (isStandalone) {
|
||||
// return null; // Already running as a PWA, no need to show install prompt
|
||||
// }
|
||||
|
||||
// return (
|
||||
// <div className="absolute w-full h-20 z-50 bg-red-500 left-0 flex items-center justify-center right-0 bottom-0 text-white">
|
||||
// {isIOS && <p>Tap "Share" and "Add to Home Screen" to install the app.</p>}
|
||||
// {isAndroid && <button onClick={handleInstallClick}>Install App</button>}
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
|
||||
// export default function PWAWrapper({
|
||||
// children,
|
||||
// }: {
|
||||
// children: React.ReactNode;
|
||||
// }) {
|
||||
// return (
|
||||
// <>
|
||||
// <InstallPrompt />
|
||||
// {children}
|
||||
// </>
|
||||
// );
|
||||
// }
|
||||
@ -5,7 +5,6 @@ import { Geist } from "next/font/google";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import { TRPCReactProvider } from "@/trpc/react";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
// import PWAWrapper from "./_components/install-prompt";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create T3 App",
|
||||
@ -31,8 +30,6 @@ export default function RootLayout({
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
{/* <PWAWrapper>
|
||||
</PWAWrapper> */}
|
||||
{children}
|
||||
<Toaster position="top-center" />
|
||||
</ThemeProvider>
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
import { appConfig } from "@/app.config";
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
export default function manifest(): MetadataRoute.Manifest {
|
||||
return {
|
||||
name: appConfig.name,
|
||||
short_name: "NextPWA",
|
||||
description: "A Progressive Web App built with Next.js",
|
||||
start_url: "/",
|
||||
display: "standalone",
|
||||
background_color: "#ffffff",
|
||||
theme_color: "#000000",
|
||||
icons: [
|
||||
{
|
||||
src: "/icon-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "/icon-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
@ -15,7 +15,7 @@ function NavLink({ href, name, icon }: NavLink) {
|
||||
asChild
|
||||
variant={"ghost"}
|
||||
className={cn(
|
||||
"p-2 size-12 text-muted-foreground/75 flex flex-col gap-2 hover:bg-transparent dark:hover:bg-transparent ",
|
||||
"p-2 size-12 text-muted-foreground/75 flex flex-col gap-2 ",
|
||||
active && "text-foreground "
|
||||
)}
|
||||
>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
"use client";
|
||||
"use client"
|
||||
|
||||
import { useTheme } from "next-themes";
|
||||
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
||||
import { useTheme } from "next-themes"
|
||||
import { Toaster as Sonner, ToasterProps } from "sonner"
|
||||
|
||||
const Toaster = ({ ...props }: ToasterProps) => {
|
||||
const { theme = "system" } = useTheme();
|
||||
const { theme = "system" } = useTheme()
|
||||
|
||||
return (
|
||||
<Sonner
|
||||
@ -19,7 +19,7 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
||||
}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export { Toaster };
|
||||
export { Toaster }
|
||||
|
||||
@ -38,7 +38,6 @@ declare module "next-auth" {
|
||||
* @see https://next-auth.js.org/configuration/options
|
||||
*/
|
||||
export const authConfig = {
|
||||
trustHost: true,
|
||||
providers: [
|
||||
DiscordProvider,
|
||||
/**
|
||||
|
||||
@ -39,5 +39,5 @@
|
||||
"**/*.js",
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "public/sw.js", "public/workbox-*.js"]
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user