mirror of
https://github.com/EdiFarcas/Giveaway-app.git
synced 2026-06-28 23:00:55 +03:00
Latest Update
This commit is contained in:
Generated
+123
-123
@@ -1701,9 +1701,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.17.31",
|
"version": "20.17.32",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.31.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.32.tgz",
|
||||||
"integrity": "sha512-quODOCNXQAbNf1Q7V+fI8WyErOCh0D5Yd31vHnKu4GkSztGQ7rlltAaqXhHhLl33tlVyUXs2386MkANSwgDn6A==",
|
"integrity": "sha512-zeMXFn8zQ+UkjK4ws0RiOC9EWByyW1CcVmLe+2rQocXRsGEDxUCwPEIVgpsGcLHS/P8JkT0oa3839BRABS0oPw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1731,17 +1731,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz",
|
||||||
"integrity": "sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==",
|
"integrity": "sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.10.0",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "8.31.0",
|
"@typescript-eslint/scope-manager": "8.31.1",
|
||||||
"@typescript-eslint/type-utils": "8.31.0",
|
"@typescript-eslint/type-utils": "8.31.1",
|
||||||
"@typescript-eslint/utils": "8.31.0",
|
"@typescript-eslint/utils": "8.31.1",
|
||||||
"@typescript-eslint/visitor-keys": "8.31.0",
|
"@typescript-eslint/visitor-keys": "8.31.1",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.3.1",
|
"ignore": "^5.3.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
@@ -1761,16 +1761,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz",
|
||||||
"integrity": "sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==",
|
"integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "8.31.0",
|
"@typescript-eslint/scope-manager": "8.31.1",
|
||||||
"@typescript-eslint/types": "8.31.0",
|
"@typescript-eslint/types": "8.31.1",
|
||||||
"@typescript-eslint/typescript-estree": "8.31.0",
|
"@typescript-eslint/typescript-estree": "8.31.1",
|
||||||
"@typescript-eslint/visitor-keys": "8.31.0",
|
"@typescript-eslint/visitor-keys": "8.31.1",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1786,14 +1786,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz",
|
||||||
"integrity": "sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==",
|
"integrity": "sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.31.0",
|
"@typescript-eslint/types": "8.31.1",
|
||||||
"@typescript-eslint/visitor-keys": "8.31.0"
|
"@typescript-eslint/visitor-keys": "8.31.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
@@ -1804,14 +1804,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz",
|
||||||
"integrity": "sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==",
|
"integrity": "sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "8.31.0",
|
"@typescript-eslint/typescript-estree": "8.31.1",
|
||||||
"@typescript-eslint/utils": "8.31.0",
|
"@typescript-eslint/utils": "8.31.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^2.0.1"
|
"ts-api-utils": "^2.0.1"
|
||||||
},
|
},
|
||||||
@@ -1828,9 +1828,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz",
|
||||||
"integrity": "sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==",
|
"integrity": "sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1842,14 +1842,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz",
|
||||||
"integrity": "sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==",
|
"integrity": "sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.31.0",
|
"@typescript-eslint/types": "8.31.1",
|
||||||
"@typescript-eslint/visitor-keys": "8.31.0",
|
"@typescript-eslint/visitor-keys": "8.31.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"fast-glob": "^3.3.2",
|
"fast-glob": "^3.3.2",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -1925,16 +1925,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz",
|
||||||
"integrity": "sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==",
|
"integrity": "sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "8.31.0",
|
"@typescript-eslint/scope-manager": "8.31.1",
|
||||||
"@typescript-eslint/types": "8.31.0",
|
"@typescript-eslint/types": "8.31.1",
|
||||||
"@typescript-eslint/typescript-estree": "8.31.0"
|
"@typescript-eslint/typescript-estree": "8.31.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
@@ -1949,13 +1949,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "8.31.0",
|
"version": "8.31.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz",
|
||||||
"integrity": "sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==",
|
"integrity": "sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.31.0",
|
"@typescript-eslint/types": "8.31.1",
|
||||||
"eslint-visitor-keys": "^4.2.0"
|
"eslint-visitor-keys": "^4.2.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1967,9 +1967,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-darwin-arm64": {
|
"node_modules/@unrs/resolver-binding-darwin-arm64": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.2.tgz",
|
||||||
"integrity": "sha512-KJfNZWh3ZzLVrIyQHcKf8vAzHHE4H7f6Huf07rdCwAWwfsvtGEYIYBDCEKfzfTDOMSR7J0AFsOUDEfOhJHGj7Q==",
|
"integrity": "sha512-vxtBno4xvowwNmO/ASL0Y45TpHqmNkAaDtz4Jqb+clmcVSSl8XCG/PNFFkGsXXXS6AMjP+ja/TtNCFFa1QwLRg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1981,9 +1981,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-darwin-x64": {
|
"node_modules/@unrs/resolver-binding-darwin-x64": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.2.tgz",
|
||||||
"integrity": "sha512-Eepa8XBbiSaNC5w9lda8QtW9d4pO7oX9DEEoZkIRUh37G5dk7r7hquAG2v1wsr9UbDHikuPgUGS78CYYmcQPvA==",
|
"integrity": "sha512-qhVa8ozu92C23Hsmv0BF4+5Dyyd5STT1FolV4whNgbY6mj3kA0qsrGPe35zNR3wAN7eFict3s4Rc2dDTPBTuFQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1995,9 +1995,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-freebsd-x64": {
|
"node_modules/@unrs/resolver-binding-freebsd-x64": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.2.tgz",
|
||||||
"integrity": "sha512-xcm5adD2ArFkzvH8DZ1BBwi4p1os0D1lid+T6lPxLcopP1bI1gi/RTqBDp2a5bOWh/wjAIRqxO5Co8dY9ngz3A==",
|
"integrity": "sha512-zKKdm2uMXqLFX6Ac7K5ElnnG5VIXbDlFWzg4WJ8CGUedJryM5A3cTgHuGMw1+P5ziV8CRhnSEgOnurTI4vpHpg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2009,9 +2009,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
|
"node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.2.tgz",
|
||||||
"integrity": "sha512-UK6CL/EaBGuu1+O/veX7PAXpjIJJgUcYmSow0CYcEzR5WBJakciPiuk2VA7lxGEFi8NdstwN/TNBGEcrfVi5UA==",
|
"integrity": "sha512-8N1z1TbPnHH+iDS/42GJ0bMPLiGK+cUqOhNbMKtWJ4oFGzqSJk/zoXFzcQkgtI63qMcUI7wW1tq2usZQSb2jxw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -2023,9 +2023,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
|
"node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.2.tgz",
|
||||||
"integrity": "sha512-qOgInSOcVW35p5XoEUWRnVO5TzR268LnWyJUNoxeFZiXfPRSf/oIBFie3J3pkF5OteWO8Eg+gP/p291bJN9QVQ==",
|
"integrity": "sha512-tjYzI9LcAXR9MYd9rO45m1s0B/6bJNuZ6jeOxo1pq1K6OBuRMMmfyvJYval3s9FPPGmrldYA3mi4gWDlWuTFGA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -2037,9 +2037,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
|
"node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.2.tgz",
|
||||||
"integrity": "sha512-VOleS+xSSXNk2+7pMgcbZgqLjXGVczMJneLqCu7l+PQ9QtcZ0gVbj95vc3+mqEbrAue9Mve65CyQVJTNeUET5g==",
|
"integrity": "sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2051,9 +2051,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-arm64-musl": {
|
"node_modules/@unrs/resolver-binding-linux-arm64-musl": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.2.tgz",
|
||||||
"integrity": "sha512-dLpmqdK1Fxz12uFYrxg/HltL2mWaIHlYf/XARbrcmPDmGfrkhwEVi9iw5aNKY1ojSD/iNoISmWKS7HVkHy4ZFA==",
|
"integrity": "sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2065,9 +2065,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
|
"node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.2.tgz",
|
||||||
"integrity": "sha512-xaVrau4Gmx/pRzCq3AFUT3cTEaK9Jj/PeEkOQweRczM8GdaQbp6kkxciZOP3ZJp1f2W3IkIuYkrV6Oz7z58zZg==",
|
"integrity": "sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -2079,9 +2079,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
|
"node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.2.tgz",
|
||||||
"integrity": "sha512-J38QcQPnfpN8H/6+3tTpgSu/w6qGHKlBpHfAKx+2sklYW/R4BLgXnhCEmkeyU3RFKQ0hmkzwAZ2U+fAiVDY+mw==",
|
"integrity": "sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -2093,9 +2093,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
|
"node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.2.tgz",
|
||||||
"integrity": "sha512-GfISZFM2r/z87oXpfLXDNoA51jMoVJa5oUxGX62/ZFNAXu6GzzgTwaaT7plq+II1BkID9gQG1hGOoHCwz2PClA==",
|
"integrity": "sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -2107,9 +2107,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
|
"node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.2.tgz",
|
||||||
"integrity": "sha512-DSGpaQ8OWhdJPQNPEhG5+KeJOGAaGnfi8eKmAUYI/R0IPMUMrm64dTo/d68jdYVn9y7Cu53LIPM4k9UBzjCwGg==",
|
"integrity": "sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -2121,9 +2121,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-x64-gnu": {
|
"node_modules/@unrs/resolver-binding-linux-x64-gnu": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.2.tgz",
|
||||||
"integrity": "sha512-3U0mVIRMB82he3+MFH5cLMsTxqlr8Q5/g6Sz3MEbnET3+qJKqBa7zEbHWHEko4N04CSas8BUEr+L2UFRsCrFaQ==",
|
"integrity": "sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2135,9 +2135,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-linux-x64-musl": {
|
"node_modules/@unrs/resolver-binding-linux-x64-musl": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz",
|
||||||
"integrity": "sha512-I8KcPBu0reYgzAjTe+5PJg7VXXjjHuAQzr8UfHV+H7xz5Cfgmnrdsa9LAZRg+SQlpjH0mO3QVFeRlaoDjmYwdQ==",
|
"integrity": "sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2149,9 +2149,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-wasm32-wasi": {
|
"node_modules/@unrs/resolver-binding-wasm32-wasi": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.2.tgz",
|
||||||
"integrity": "sha512-VV1AVT5ikRtb2GMq+LfOHUMaZzkbua5PdAv97+L5gp6+5R49aCIAHFZMW3VNU0LYUHwn0WwzgFMQ7hVlHYX7MA==",
|
"integrity": "sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"wasm32"
|
"wasm32"
|
||||||
],
|
],
|
||||||
@@ -2166,9 +2166,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
|
"node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.2.tgz",
|
||||||
"integrity": "sha512-i6T6/GsTn0B8fthG7jkn/wFBrwJKBm4/V/bZB8j+FtrlW9nk0xL2IckBO6NuwaX2d47b7vMUTVMcG+CKPRmcMw==",
|
"integrity": "sha512-gtYTh4/VREVSLA+gHrfbWxaMO/00y+34htY7XpioBTy56YN2eBjkPrY1ML1Zys89X3RJDKVaogzwxlM1qU7egg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2180,9 +2180,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
|
"node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.2.tgz",
|
||||||
"integrity": "sha512-d6Cy8VqTGT/ehavIek6XNi7ZVpKhyG0CXgYBPNNdZWI+7huy3KfQM2ME5pEKudkOLjtzEsbwWnNdCswpn6s/tg==",
|
"integrity": "sha512-Ywv20XHvHTDRQs12jd3MY8X5C8KLjDbg/jyaal/QLKx3fAShhJyD4blEANInsjxW3P7isHx1Blt56iUDDJO3jg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -2194,9 +2194,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@unrs/resolver-binding-win32-x64-msvc": {
|
"node_modules/@unrs/resolver-binding-win32-x64-msvc": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.2.tgz",
|
||||||
"integrity": "sha512-isaSSX0p2m4Fe9gjJZi+ga6yeRhej237QiC0vQVawsA1Xmr3updYoEEpB4F0LNVjmLUiLqxfmh8f68eGThYqtg==",
|
"integrity": "sha512-friS8NEQfHaDbkThxopGk+LuE5v3iY0StruifjQEt7SLbA46OnfgMO15sOTkbpJkol6RB+1l1TYPXh0sCddpvA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2984,9 +2984,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.143",
|
"version": "1.5.144",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.143.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.144.tgz",
|
||||||
"integrity": "sha512-QqklJMOFBMqe46k8iIOwA9l2hz57V2OKMmP5eSWcUvwx+mASAsbU+wkF1pHjn9ZVSBPrsYWr4/W/95y5SwYg2g==",
|
"integrity": "sha512-eJIaMRKeAzxfBSxtjYnoIAw/tdD6VIH6tHBZepZnAbE3Gyqqs5mGN87DvcldPUbVkIljTK8pY0CMcUljP64lfQ==",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
@@ -5152,9 +5152,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/napi-postinstall": {
|
"node_modules/napi-postinstall": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.2.3.tgz",
|
||||||
"integrity": "sha512-3VK+GygwU4OMkBYdQLpRjxnt7idAsZAN5hnrWLHIAu4X+uO4uhqrIggKF1TacBV9OPUMwTb1sQQvwKRzfXLnQg==",
|
"integrity": "sha512-Mi7JISo/4Ij2tDZ2xBE2WH+/KvVlkhA6juEjpEeRAVPNCpN3nxJo/5FhDNKgBcdmcmhaH6JjgST4xY/23ZYK0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -6626,36 +6626,36 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/unrs-resolver": {
|
"node_modules/unrs-resolver": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.2.tgz",
|
||||||
"integrity": "sha512-jsXGehlxwxyetBCbABwgKB41xF1zhcnHYs9X16Cyx1aaWXFvqaXRJOpRgc/kB9zTBaSivwhFEHThoiu74PSU6w==",
|
"integrity": "sha512-BBKpaylOW8KbHsu378Zky/dGh4ckT/4NW/0SHRABdqRLcQJ2dAOjDo9g97p04sWflm0kqPqpUatxReNV/dqI5A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"napi-postinstall": "^0.2.1"
|
"napi-postinstall": "^0.2.2"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/JounQin"
|
"url": "https://github.com/sponsors/JounQin"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@unrs/resolver-binding-darwin-arm64": "1.7.1",
|
"@unrs/resolver-binding-darwin-arm64": "1.7.2",
|
||||||
"@unrs/resolver-binding-darwin-x64": "1.7.1",
|
"@unrs/resolver-binding-darwin-x64": "1.7.2",
|
||||||
"@unrs/resolver-binding-freebsd-x64": "1.7.1",
|
"@unrs/resolver-binding-freebsd-x64": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.1",
|
"@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-arm-musleabihf": "1.7.1",
|
"@unrs/resolver-binding-linux-arm-musleabihf": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-arm64-gnu": "1.7.1",
|
"@unrs/resolver-binding-linux-arm64-gnu": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-arm64-musl": "1.7.1",
|
"@unrs/resolver-binding-linux-arm64-musl": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-ppc64-gnu": "1.7.1",
|
"@unrs/resolver-binding-linux-ppc64-gnu": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-riscv64-gnu": "1.7.1",
|
"@unrs/resolver-binding-linux-riscv64-gnu": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-riscv64-musl": "1.7.1",
|
"@unrs/resolver-binding-linux-riscv64-musl": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-s390x-gnu": "1.7.1",
|
"@unrs/resolver-binding-linux-s390x-gnu": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-x64-gnu": "1.7.1",
|
"@unrs/resolver-binding-linux-x64-gnu": "1.7.2",
|
||||||
"@unrs/resolver-binding-linux-x64-musl": "1.7.1",
|
"@unrs/resolver-binding-linux-x64-musl": "1.7.2",
|
||||||
"@unrs/resolver-binding-wasm32-wasi": "1.7.1",
|
"@unrs/resolver-binding-wasm32-wasi": "1.7.2",
|
||||||
"@unrs/resolver-binding-win32-arm64-msvc": "1.7.1",
|
"@unrs/resolver-binding-win32-arm64-msvc": "1.7.2",
|
||||||
"@unrs/resolver-binding-win32-ia32-msvc": "1.7.1",
|
"@unrs/resolver-binding-win32-ia32-msvc": "1.7.2",
|
||||||
"@unrs/resolver-binding-win32-x64-msvc": "1.7.1"
|
"@unrs/resolver-binding-win32-x64-msvc": "1.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
youtubeHandle?: string;
|
||||||
|
coins: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ProfileClient({ user }: { user: User }) {
|
||||||
|
const [youtubeHandle, setYoutubeHandle] = useState(user.youtubeHandle || "");
|
||||||
|
const [saving, setSaving] = useState(false);
|
||||||
|
|
||||||
|
const handleSave = async () => {
|
||||||
|
setSaving(true);
|
||||||
|
try {
|
||||||
|
const res = await fetch("/api/youtube-handle", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({ youtubeHandle }),
|
||||||
|
});
|
||||||
|
if (!res.ok) throw new Error("Failed to update");
|
||||||
|
alert("YouTube handle updated successfully!");
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
alert("Error updating handle.");
|
||||||
|
} finally {
|
||||||
|
setSaving(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="max-w-3xl mx-auto">
|
||||||
|
<div className="bg-black rounded-2xl shadow-xl overflow-hidden">
|
||||||
|
<div className="bg-gradient-to-r from-purple-600 to-blue-500 p-6">
|
||||||
|
<div className="flex items-center space-x-4">
|
||||||
|
<div className="h-16 w-16 bg-white rounded-full flex items-center justify-center">
|
||||||
|
<span className="text-2xl font-bold bg-gradient-to-r from-purple-600 to-blue-500 bg-clip-text text-transparent">
|
||||||
|
{user.name?.[0]?.toUpperCase() || 'U'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h1 className="text-2xl font-bold text-white">{user.name}</h1>
|
||||||
|
<p className="text-purple-100">🌟 Premium Member</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="p-6">
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
|
<div className="space-y-4">
|
||||||
|
<div className="flex items-center space-x-3 p-3 bg-gray-50 rounded-lg">
|
||||||
|
<span className="text-lg">👤</span>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-black">Full Name</p>
|
||||||
|
<p className="font-medium text-gray-500">{user.name}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex items-center space-x-3 p-3 bg-gray-50 rounded-lg">
|
||||||
|
<span className="text-lg">📧</span>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-black">Email Address</p>
|
||||||
|
<p className="font-medium text-gray-500">{user.email}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-col space-y-2 p-3 bg-gray-50 rounded-lg">
|
||||||
|
<label className="text-sm text-black flex items-center">
|
||||||
|
<span className="text-lg mr-2">📺</span> YouTube Handle
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="p-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-600 text-black"
|
||||||
|
placeholder="@yourhandle"
|
||||||
|
value={youtubeHandle}
|
||||||
|
onChange={(e) => setYoutubeHandle(e.target.value)}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
onClick={handleSave}
|
||||||
|
disabled={saving}
|
||||||
|
className="bg-purple-600 text-white px-4 py-2 rounded-lg mt-2 hover:bg-purple-700 transition-colors disabled:opacity-50"
|
||||||
|
>
|
||||||
|
{saving ? "Saving..." : "Save Handle"}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="bg-purple-50 rounded-xl p-5">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-purple-600 mb-1">Available Balance</p>
|
||||||
|
<div className="flex items-baseline space-x-2">
|
||||||
|
<span className="text-lg">💰</span>
|
||||||
|
<span className="text-2xl font-bold text-black">{user.coins}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button className="bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition-colors">
|
||||||
|
Add Coins
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-8 border-t border-gray-100 pt-6">
|
||||||
|
<h3 className="text-lg font-semibold mb-4 flex items-center">
|
||||||
|
<span className="text-xl mr-2">⭐</span>
|
||||||
|
Achievements
|
||||||
|
</h3>
|
||||||
|
<div className="grid grid-cols-3 gap-4">
|
||||||
|
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
||||||
|
<div className="text-2xl font-bold text-purple-600">5</div>
|
||||||
|
<div className="text-sm text-gray-500">Completed Tasks</div>
|
||||||
|
</div>
|
||||||
|
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
||||||
|
<div className="text-2xl font-bold text-purple-600">12</div>
|
||||||
|
<div className="text-sm text-gray-500">Active Days</div>
|
||||||
|
</div>
|
||||||
|
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
||||||
|
<div className="text-2xl font-bold text-purple-600">3</div>
|
||||||
|
<div className="text-sm text-gray-500">Badges Earned</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+12
-136
@@ -1,20 +1,18 @@
|
|||||||
"use client"; // <-- add this because we will use onChange, onSubmit!
|
|
||||||
|
|
||||||
import { useState } from "react";
|
|
||||||
import { getServerSession } from "next-auth";
|
import { getServerSession } from "next-auth";
|
||||||
import { authOptions } from "../api/auth/[...nextauth]/route";
|
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
||||||
import { db } from "@/lib/db";
|
import { db } from "@/lib/db";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
import ProfileClient from "./ProfileClient";
|
||||||
|
|
||||||
export default async function ProfilePage() {
|
export default async function ProfilePage() {
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
|
|
||||||
if (!session) {
|
if (!session?.user?.email) {
|
||||||
redirect("/api/auth/signin");
|
redirect("/api/auth/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await db.user.findUnique({
|
const user = await db.user.findUnique({
|
||||||
where: { email: session.user?.email! },
|
where: { email: session.user.email },
|
||||||
select: {
|
select: {
|
||||||
name: true,
|
name: true,
|
||||||
email: true,
|
email: true,
|
||||||
@@ -27,136 +25,14 @@ export default async function ProfilePage() {
|
|||||||
redirect("/api/auth/signin");
|
redirect("/api/auth/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
return <ProfileContent user={user} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a separate component for the UI part
|
|
||||||
function ProfileContent({ user }: { user: any }) {
|
|
||||||
const [youtubeHandle, setYoutubeHandle] = useState(user.youtubeHandle || "");
|
|
||||||
const [saving, setSaving] = useState(false);
|
|
||||||
|
|
||||||
const handleSave = async () => {
|
|
||||||
setSaving(true);
|
|
||||||
try {
|
|
||||||
const res = await fetch("/api/youtube-handle", {
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ youtubeHandle }),
|
|
||||||
});
|
|
||||||
if (!res.ok) throw new Error("Failed to update");
|
|
||||||
alert("YouTube handle updated successfully!");
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
alert("Error updating handle.");
|
|
||||||
} finally {
|
|
||||||
setSaving(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
|
<ProfileClient
|
||||||
<div className="max-w-3xl mx-auto">
|
user={{
|
||||||
<div className="bg-black rounded-2xl shadow-xl overflow-hidden">
|
name: user.name ?? "",
|
||||||
{/* Profile Header */}
|
email: user.email ?? "",
|
||||||
<div className="bg-gradient-to-r from-purple-600 to-blue-500 p-6">
|
coins: user.coins,
|
||||||
<div className="flex items-center space-x-4">
|
youtubeHandle: user.youtubeHandle ?? "",
|
||||||
<div className="h-16 w-16 bg-white rounded-full flex items-center justify-center">
|
}}
|
||||||
<span className="text-2xl font-bold bg-gradient-to-r from-purple-600 to-blue-500 bg-clip-text text-transparent">
|
/>
|
||||||
{user.name?.[0]?.toUpperCase() || 'U'}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h1 className="text-2xl font-bold text-white">{user.name}</h1>
|
|
||||||
<p className="text-purple-100">🌟 Premium Member</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Profile Content */}
|
|
||||||
<div className="p-6">
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
||||||
{/* Personal Info */}
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div className="flex items-center space-x-3 p-3 bg-gray-50 rounded-lg">
|
|
||||||
<span className="text-lg">👤</span>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm text-black">Full Name</p>
|
|
||||||
<p className="font-medium text-gray-500">{user.name}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center space-x-3 p-3 bg-gray-50 rounded-lg">
|
|
||||||
<span className="text-lg">📧</span>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm text-black">Email Address</p>
|
|
||||||
<p className="font-medium text-gray-500">{user.email}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* YouTube Handle */}
|
|
||||||
<div className="flex flex-col space-y-2 p-3 bg-gray-50 rounded-lg">
|
|
||||||
<label className="text-sm text-black flex items-center">
|
|
||||||
<span className="text-lg mr-2">📺</span> YouTube Handle
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
className="p-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-600 text-black"
|
|
||||||
placeholder="@yourhandle"
|
|
||||||
value={youtubeHandle}
|
|
||||||
onChange={(e) => setYoutubeHandle(e.target.value)}
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
onClick={handleSave}
|
|
||||||
disabled={saving}
|
|
||||||
className="bg-purple-600 text-white px-4 py-2 rounded-lg mt-2 hover:bg-purple-700 transition-colors disabled:opacity-50"
|
|
||||||
>
|
|
||||||
{saving ? "Saving..." : "Save Handle"}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Coins Section */}
|
|
||||||
<div className="bg-purple-50 rounded-xl p-5">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<p className="text-sm text-purple-600 mb-1">Available Balance</p>
|
|
||||||
<div className="flex items-baseline space-x-2">
|
|
||||||
<span className="text-lg">💰</span>
|
|
||||||
<span className="text-2xl font-bold text-black">{user.coins}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button className="bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition-colors">
|
|
||||||
Add Coins
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Achievement Section */}
|
|
||||||
<div className="mt-8 border-t border-gray-100 pt-6">
|
|
||||||
<h3 className="text-lg font-semibold mb-4 flex items-center">
|
|
||||||
<span className="text-xl mr-2">⭐</span>
|
|
||||||
Achievements
|
|
||||||
</h3>
|
|
||||||
<div className="grid grid-cols-3 gap-4">
|
|
||||||
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
|
||||||
<div className="text-2xl font-bold text-purple-600">5</div>
|
|
||||||
<div className="text-sm text-gray-500">Completed Tasks</div>
|
|
||||||
</div>
|
|
||||||
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
|
||||||
<div className="text-2xl font-bold text-purple-600">12</div>
|
|
||||||
<div className="text-sm text-gray-500">Active Days</div>
|
|
||||||
</div>
|
|
||||||
<div className="text-center p-4 bg-gray-50 rounded-lg">
|
|
||||||
<div className="text-2xl font-bold text-purple-600">3</div>
|
|
||||||
<div className="text-sm text-gray-500">Badges Earned</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user