Skip to content

Commit

Permalink
update basically everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Hassunaama committed Dec 17, 2024
1 parent 6700733 commit a193589
Show file tree
Hide file tree
Showing 10 changed files with 1,847 additions and 1,201 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

13 changes: 13 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [...compat.extends("next/core-web-vitals")];
2,915 changes: 1,766 additions & 1,149 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 24 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,41 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 25572",
"dev": "next dev --turbopack -p 25572",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@auth/prisma-adapter": "^2.4.1",
"@prisma/client": "^5.18.0",
"@stripe/react-stripe-js": "^2.8.0",
"@stripe/stripe-js": "^4.3.0",
"framer-motion": "^11.3.21",
"next": "14.2.11",
"next-auth": "^5.0.0-beta.20",
"next-intl": "^3.17.6",
"prisma": "^5.19.1",
"react": "^18",
"react-dom": "^18",
"skinview3d": "^3.0.1",
"stripe": "^16.8.0",
"@auth/prisma-adapter": "^2.7.4",
"@prisma/client": "^6.0.1",
"@stripe/react-stripe-js": "^3.1.1",
"@stripe/stripe-js": "^5.3.0",
"framer-motion": "^11.15.0",
"next": "15.1.0",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^3.26.1",
"prisma": "^6.0.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"skinview3d": "^3.1.0",
"stripe": "^17.4.0",
"vanilla-tilt": "^1.8.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@types/node": "^22",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/scrollreveal": "^0.0.11",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.2",
"eslint": "^9",
"eslint-config-next": "15.1.0",
"postcss": "^8",
"tailwindcss": "^3.4.6",
"typescript": "^5"
},
"overrides": {
"@types/react": "19.0.1",
"@types/react-dom": "19.0.2"
}
}
6 changes: 2 additions & 4 deletions src/app/api/data/misc/minecraftSkin/[username]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export async function GET(
request: Request,
{ params }: { params: { username: string } }
) {
export async function GET(request: Request, props: { params: Promise<{ username: string }> }) {
const params = await props.params;
const username = params.username
// Helper function to fetch the Mojang profile ID based on the username
async function getProfileId(username: string): Promise<string | null> {
Expand Down
3 changes: 2 additions & 1 deletion src/app/billing/products/[product]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default function Product({ params }: { params: { product: string } }) {
export default async function Product(props: { params: Promise<{ product: string }> }) {
const params = await props.params;
return (
<div>{params.product}</div>
)
Expand Down
31 changes: 16 additions & 15 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ import AxsoterLogo from '@/components/other/AxsoterLogo';
import { auth } from "@/auth"
import { redirect } from 'next/navigation';

export default async function LoginPage({searchParams}: {searchParams: { [key: string]: string | undefined }}) {
const session = await auth()
export default async function LoginPage(props: {searchParams: Promise<{ [key: string]: string | undefined }>}) {
const searchParams = await props.searchParams;
const session = await auth()

if (!session) return (
<main className="grow min-h-screen">
<div className="h-screen my-auto flex items-center justify-center flex-col">
<div className="flex items-center font-semibold text-lg py-4 gap-x-2">
<AxsoterLogo />
</div>
<div className="max-w-lg w-full bg-defaultBg rounded-2xl px-6 py-5 border-2 border-dotted border-axsoterBlue">
<LoginForm queryParams={searchParams} />
</div>
</div>
</main>
);
if (!session) return (
<main className="grow min-h-screen">
<div className="h-screen my-auto flex items-center justify-center flex-col">
<div className="flex items-center font-semibold text-lg py-4 gap-x-2">
<AxsoterLogo />
</div>
<div className="max-w-lg w-full bg-defaultBg rounded-2xl px-6 py-5 border-2 border-dotted border-axsoterBlue">
<LoginForm queryParams={searchParams} />
</div>
</div>
</main>
);

redirect("/");
redirect("/");
}
8 changes: 4 additions & 4 deletions src/components/buttons/NavLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function NavLoginButton() {
</Link>
</div>
<hr className="border-gray-700 rounded-full my-3 w-full" />
<a href="/api/auth/signout" className="rounded p-2 mb-2 flex items-center gap-x-2 ease-in-out duration-300 hover:bg-slate-600 bg-slate-800">
<Link href="/api/auth/signout" className="rounded p-2 mb-2 flex items-center gap-x-2 ease-in-out duration-300 hover:bg-slate-600 bg-slate-800">
<svg
xmlns="http://www.w3.org/2000/svg"
height="48px"
Expand All @@ -93,8 +93,8 @@ export default function NavLoginButton() {
</svg>

{t('services')}
</a>
<a href="/api/auth/logout" className="rounded p-2 mt-2 flex items-center gap-x-2 ease-in-out duration-300 hover:bg-slate-600 bg-slate-800">
</Link>
<Link href="/api/auth/logout" className="rounded p-2 mt-2 flex items-center gap-x-2 ease-in-out duration-300 hover:bg-slate-600 bg-slate-800">
<svg
xmlns="http://www.w3.org/2000/svg"
height="48px"
Expand All @@ -107,7 +107,7 @@ export default function NavLoginButton() {
</svg>

{general('logout')}
</a>
</Link>
</div>

<Link href="/billing/cart" className="flex items-center justify-center lg:ml-1.5 ml-auto p-3 lg:rounded-xl rounded-lg ease-in-out duration-300 hover:bg-slate-600/80">
Expand Down
2 changes: 1 addition & 1 deletion src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cookies } from 'next/headers';
export default getRequestConfig(async () => {
// Provide a static locale, fetch a user setting,
// read from `cookies()`, `headers()`, etc.
const locale = cookies().get('lang')?.value ? cookies().get('lang')?.value : "fi";
const locale = (await cookies()).get('lang')?.value ? (await cookies()).get('lang')?.value : "fi";

return {
locale,
Expand Down
24 changes: 19 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +22,19 @@
}
],
"paths": {
"@/*": ["./src/*"]
}
"@/*": [
"./src/*"
]
},
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit a193589

Please sign in to comment.