feat: add user authentication UI to header component
Add login and register dialogs, user dropdown menu with profile link and logout option, and integrate with session management hook. Prevent hydration mismatches by conditionally rendering auth elements after mount. Update package-lock.json with new @esbuild dependencies for build tooling.
This commit is contained in:
1 parent
e641138887
commit
55eebde0ba
55 files changed
+7353
-7
No files matched your search
@@ -0,0 +1,26 @@
|
||||
-- Migration 011: Tabela de doações
|
||||
-- Criado em: 2025-01-27
|
||||
|
||||
-- Tabela de doações
|
||||
CREATE TABLE IF NOT EXISTS donations (
|
||||
donation_id SERIAL PRIMARY KEY,
|
||||
user_id INTEGER REFERENCES users(user_id),
|
||||
donor_name VARCHAR(100),
|
||||
donor_email VARCHAR(255),
|
||||
amount DECIMAL(10, 2) NOT NULL,
|
||||
donation_level VARCHAR(20) CHECK (donation_level IN ('coffee', 'snack', 'lunch', 'custom')),
|
||||
payment_method VARCHAR(20) DEFAULT 'pix',
|
||||
payment_status VARCHAR(20) DEFAULT 'pending' CHECK (payment_status IN ('pending', 'completed', 'failed', 'refunded')),
|
||||
abacatepay_id VARCHAR(100),
|
||||
message TEXT,
|
||||
is_anonymous BOOLEAN DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
completed_at TIMESTAMP
|
||||
);
|
||||
|
||||
-- Índices para performance
|
||||
CREATE INDEX IF NOT EXISTS idx_donations_user ON donations(user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_donations_status ON donations(payment_status);
|
||||
CREATE INDEX IF NOT EXISTS idx_donations_abacatepay_id ON donations(abacatepay_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_donations_created_at ON donations(created_at DESC);
|
||||
|
||||
Reference in new issue
Block a user