This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client'; | |
const GrainOverlay = () => { | |
return ( | |
<> | |
{/* Primary Fine Grain Layer - Enhanced visibility */} | |
<div | |
className="pointer-events-none absolute inset-0 z-20 opacity-60" | |
style={{ | |
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cfilter id='fineGrain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='4' result='noise' seed='3'/%3E%3CfeColorMatrix in='noise' type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0.3 0.5 0.7 0.9 1.0'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fineGrain)'/%3E%3C/svg%3E")`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
// Advanced Image Optimization Component | |
const OptimizedImage = ({ | |
src, | |
alt, | |
width, | |
height, | |
quality = 75, | |
formats = ['webp', 'avif'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// P.S. the real moeny is at the buttom of the file | |
import { getTableColumns, type Table } from "drizzle-orm"; | |
/** | |
* Creates a column selector for a given Drizzle ORM table. | |
* | |
* This function allows for flexible selection and omission of columns from a table. | |
* | |
* @param table - The Drizzle ORM table to create a column selector for. |