mirror of
https://github.com/EdiFarcas/Giveaway-app.git
synced 2026-06-22 07:00:57 +03:00
Update, nu merge, lag
This commit is contained in:
@@ -15,6 +15,8 @@ interface GiveawayCardProps {
|
|||||||
const GiveawayCard: React.FC<GiveawayCardProps> = ({ id, title, description, imageUrl, value, userId}) => {
|
const GiveawayCard: React.FC<GiveawayCardProps> = ({ id, title, description, imageUrl, value, userId}) => {
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
|
||||||
|
const entrienumber = entrycount(userId, id);
|
||||||
|
|
||||||
const handleEnterClick = () => {
|
const handleEnterClick = () => {
|
||||||
const activeUserCoins = 300; // Replace with actual logic to fetch active user's coins (TO DO LATER)
|
const activeUserCoins = 300; // Replace with actual logic to fetch active user's coins (TO DO LATER)
|
||||||
if (activeUserCoins >= value) {
|
if (activeUserCoins >= value) {
|
||||||
@@ -35,7 +37,7 @@ const GiveawayCard: React.FC<GiveawayCardProps> = ({ id, title, description, ima
|
|||||||
<h3 className="text-lg font-bold mb-2">{title}</h3>
|
<h3 className="text-lg font-bold mb-2">{title}</h3>
|
||||||
<p className="text-gray-600 text-sm">{description}</p>
|
<p className="text-gray-600 text-sm">{description}</p>
|
||||||
<p className="text-gray-600 text-sm mt-2">Value: {value} coins</p>
|
<p className="text-gray-600 text-sm mt-2">Value: {value} coins</p>
|
||||||
<p className="text-gray-600 text-sm mt-2">Your entries: {entrycount(userId, id)}</p>
|
{/* <p className="text-gray-600 text-sm mt-2">Your entries: {entrycount(userId, id)}</p> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="p-4 flex items-center">
|
<div className="p-4 flex items-center">
|
||||||
<button
|
<button
|
||||||
@@ -50,7 +52,7 @@ const GiveawayCard: React.FC<GiveawayCardProps> = ({ id, title, description, ima
|
|||||||
{/* Modal */}
|
{/* Modal */}
|
||||||
{isModalOpen && (
|
{isModalOpen && (
|
||||||
<div className="fixed inset-0 bg-opacity-50 backdrop-blur-sm z-50 flex justify-center items-center">
|
<div className="fixed inset-0 bg-opacity-50 backdrop-blur-sm z-50 flex justify-center items-center">
|
||||||
<div className="bg-white p-6 rounded-lg shadow-lg w-96 relative">
|
<div className="bg-white p-6 rouded-lg shadow-lg w-96 relative">
|
||||||
<h2 className="text-xl font-bold mb-4">{title}</h2>
|
<h2 className="text-xl font-bold mb-4">{title}</h2>
|
||||||
<p className="text-gray-600 mb-4">{description}</p>
|
<p className="text-gray-600 mb-4">{description}</p>
|
||||||
<img src={imageUrl} alt={title} className="w-full h-48 object-cover mb-4" />
|
<img src={imageUrl} alt={title} className="w-full h-48 object-cover mb-4" />
|
||||||
|
|||||||
Reference in New Issue
Block a user