refactor: replace Image component with img tag for app logo

The commit replaces the Next.js `Image` component with the standard HTML `img` tag in the app logo rendering. This change simplifies the implementation and removes unnecessary dependencies. Additionally, the `env` import was removed from the seed file, the docker-compose image tag was updated to a specific version, and remote image patterns were added to the Next.js config.
This commit is contained in:
Daniel Luiz Alves
2025-04-17 11:49:32 -03:00
parent fccc9d559f
commit a2a5b6a88b
5 changed files with 16 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
import { prisma } from "../src/shared/prisma"; import { prisma } from "../src/shared/prisma";
import {env} from "../src/env"
import bcrypt from "bcryptjs"; import bcrypt from "bcryptjs";
import crypto from "node:crypto"; import crypto from "node:crypto";

View File

@@ -9,6 +9,18 @@ const nextConfig: NextConfig = {
typescript: { typescript: {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
{
protocol: 'http',
hostname: '**',
},
],
}
}; };
const withNextIntl = createNextIntlPlugin(); const withNextIntl = createNextIntlPlugin();

View File

@@ -1,7 +1,6 @@
"use client"; "use client";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react"; // Add this import
import Image from "next/image"; // Add this import
import Link from "next/link"; import Link from "next/link";
import { IconHeart, IconMenu2 } from "@tabler/icons-react"; import { IconHeart, IconMenu2 } from "@tabler/icons-react";
@@ -27,9 +26,7 @@ export function Navbar() {
<div className="flex flex-1 items-center justify-between"> <div className="flex flex-1 items-center justify-between">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<Link href="/" className="flex items-center gap-2"> <Link href="/" className="flex items-center gap-2">
{appLogo && ( {appLogo && <img alt="App Logo" className="h-8 w-8 object-contain rounded" src={appLogo} />}
<Image alt="App Logo" src={appLogo} width={32} height={32} className="object-contain rounded" />
)}
<p className="font-bold text-2xl">{appName}</p> <p className="font-bold text-2xl">{appName}</p>
</Link> </Link>
<nav className="hidden lg:flex ml-2 gap-4"> <nav className="hidden lg:flex ml-2 gap-4">

View File

@@ -12,7 +12,7 @@ export function ShareHeader() {
<header className="w-full px-6 border-b border-default-200/50 bg-background/70 backdrop-blur-sm"> <header className="w-full px-6 border-b border-default-200/50 bg-background/70 backdrop-blur-sm">
<div className="mx-auto max-w-5xl sm:p-0 h-16 flex items-center justify-between"> <div className="mx-auto max-w-5xl sm:p-0 h-16 flex items-center justify-between">
<Link className="flex items-center gap-2" href="/"> <Link className="flex items-center gap-2" href="/">
{appLogo && <Image alt="App Logo" src={appLogo} width={32} height={32} className="object-contain rounded" />} {appLogo && <img alt="App Logo" className="h-8 w-8 object-contain rounded" src={appLogo} />}
<p className="font-bold text-2xl text-foreground">{appName}</p> <p className="font-bold text-2xl text-foreground">{appName}</p>
</Link> </Link>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">

View File

@@ -30,7 +30,7 @@ services:
start_period: 30s start_period: 30s
palmr-app: palmr-app:
image: kyantech/palmr-app:latest # Make sure to use the correct version (latest) of the image image: kyantech/palmr-app:v2.0.0-beta # Make sure to use the correct version (latest) of the image
container_name: palmr-web container_name: palmr-web
depends_on: depends_on:
palmr-api: palmr-api: