Skip to content

Commit

Permalink
⚡ perf: improve login screen performance with .webp image
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcastr0 committed Dec 4, 2024
1 parent afe3a3a commit 2b8c971
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 30 deletions.
9 changes: 0 additions & 9 deletions public/images/floater-icon.svg

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/geometric-shape.svg

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/github-icon.svg

This file was deleted.

6 changes: 0 additions & 6 deletions public/images/hamburguer-left.svg

This file was deleted.

6 changes: 0 additions & 6 deletions public/images/hamburguer-right.svg

This file was deleted.

Binary file removed public/images/loading-wallpaper.jpg
Binary file not shown.
Binary file added public/images/loading-wallpaper.webp
Binary file not shown.
Binary file removed public/images/login-wallpaper.jpg
Binary file not shown.
Binary file added public/images/login-wallpaper.webp
Binary file not shown.
Binary file removed public/images/midaz-login-screen.png
Binary file not shown.
Binary file added public/images/midaz-login-screen.webp
Binary file not shown.
5 changes: 3 additions & 2 deletions src/app/(auth-routes)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { LoadingButton } from '@/components/ui/loading-button'
import { ArrowRight } from 'lucide-react'
import React from 'react'
import LoadingScreen from '@/components/loading-screen'
import MidazLogo from '@/images/midaz-login-screen.png'
import BackgroundImage from '@/images/login-wallpaper.jpg'
import MidazLogo from '@/images/midaz-login-screen.webp'
import BackgroundImage from '@/images/login-wallpaper.webp'
import {
Tooltip,
TooltipContent,
Expand Down Expand Up @@ -179,6 +179,7 @@ const SignInPage = () => {
src={BackgroundImage}
fill
sizes="50vw, 100vh"
className="object-cover"
/>
<div className="absolute inset-0 bg-black bg-opacity-50"></div>
<div className="relative z-10">
Expand Down
2 changes: 1 addition & 1 deletion src/components/loading-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React from 'react'
import Image from 'next/image'
import LoadingImage from '@/images/loading-wallpaper.jpg'
import LoadingImage from '@/images/loading-wallpaper.webp'
import midazLoading from '@/animations/midaz-loading.json'
import { Lottie } from '@/lib/lottie'

Expand Down

0 comments on commit 2b8c971

Please sign in to comment.