This commit is contained in:
2025-12-07 18:05:05 +03:00
parent e263d2e235
commit ce41fdb432
4 changed files with 34 additions and 3 deletions

View File

@@ -2,6 +2,16 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'apiilker.edoysoft.com',
port: '',
pathname: '/storage/v1/object/public/**',
},
],
},
};
export default nextConfig;

View File

@@ -4,6 +4,7 @@ import { Plus, Users, Edit } from "lucide-react"
import Link from "next/link"
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { Badge } from "@/components/ui/badge"
import Image from "next/image"
export default async function HallsPage() {
const supabase = await createClient()
@@ -34,9 +35,6 @@ export default async function HallsPage() {
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{halls?.map((hall) => (
<Card key={hall.id} className="flex flex-col overflow-hidden transition-all hover:shadow-md">
import Image from "next/image"
// ... inside the CardHeader ...
<CardHeader className="bg-muted/20 pb-4 relative">
<div className="flex items-start justify-between gap-4">
<div className="flex items-center gap-3">

View File

@@ -0,0 +1,3 @@
-- Add logo_url column to halls table
alter table halls
add column logo_url text;

View File

@@ -0,0 +1,20 @@
-- 1. Create the storage bucket
insert into storage.buckets (id, name, public)
values ('hall-logos', 'hall-logos', true);
-- 2. Enable RLS (although buckets are publicly accessible via the 'public' flag, policies are good practice)
create policy "Public Access"
on storage.objects for select
using ( bucket_id = 'hall-logos' );
create policy "Authenticated Uploads"
on storage.objects for insert
with check ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );
create policy "Authenticated Updates"
on storage.objects for update
with check ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );
create policy "Authenticated Deletes"
on storage.objects for delete
using ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );