Skip to content

Commit

Permalink
feat(ui): add upgrade icon to VercelInfo component for Next.js versio…
Browse files Browse the repository at this point in the history
…n alerts
  • Loading branch information
jirihofman committed Feb 1, 2025
1 parent 5f31e1b commit b56b4d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/vercel-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getNextjsLatestRelease, getRepositoryPackageJson, checkAppJsxExistence
import Popover from './popover';
import { RiTailwindCssFill } from "react-icons/ri";
import { SiReactbootstrap } from 'react-icons/si';
import { MdUpgrade } from "react-icons/md";

export const VercelInfo = async ({ info }) => {

Expand Down Expand Up @@ -38,7 +39,7 @@ export const VercelInfo = async ({ info }) => {
// Icons copied from https://vercel.com/design/brands

const upgradeIcon = info.framework === 'nextjs' && nextjsVersion && nextjsVersion < nextjsLatestRelease.tagName
? <Popover button={<span style={{ fontSize: 'medium' }}></span>} content={<span><p><strong>Upgrade available</strong></p>Next.js: {nextjsVersion} ➡️ {nextjsLatestRelease.tagName}</span>} />
? <Popover button={<MdUpgrade color='white' size={'20'} className='-mb-1' />} content={<span><p><strong>Upgrade available</strong></p>Next.js: {nextjsVersion} ➡️ {nextjsLatestRelease.tagName}</span>} />
: null;

const vercelIcon = <Popover button={<svg aria-label="Vercel logomark" height="16" role="img" style={{ width: 'auto', overflow: 'visible' }} viewBox="0 0 74 64">
Expand Down

0 comments on commit b56b4d7

Please sign in to comment.