Skip to content

Conversation

n3-rd
Copy link

@n3-rd n3-rd commented Sep 3, 2025

This pull request introduces QR code functionality to the console app, allowing users to easily share referral links and uploaded file links via QR codes. The main changes include the addition of a reusable QR code component, integration of QR code buttons in the referrals and uploader pages, and the installation of the necessary QR code library.

QR code feature integration:

  • Added a new reusable StorachaQRCode React component in src/qr.tsx, leveraging the react-qrcode-logo library to render branded QR codes.
  • Installed the react-qrcode-logo package and its dependency qrcode-generator, updating package.json and pnpm-lock.yaml accordingly. [1] [2] [3] [4] [5] [6]

UI changes for QR code sharing:

  • Added a new QRButton component to display referral links as QR codes in a modal, and integrated it into the referrals page (src/app/referrals/page.tsx). [1] [2] [3] [4]
  • Updated the uploader component to display a QR code for the uploaded file link upon successful upload. [1] [2]

Minor UI and dependency adjustments:

  • Adjusted uploader dropzone styling for better usability.
  • Minor dependency order changes in package.json for consistency. [1] [2]

- Introduced `StorachaQRCode` component for generating QR codes.
- Added `QRButton` component to trigger QR code display.
- Integrated QR code display in the referrals page and uploader component.
- Updated dependencies in `package.json` for `react-qrcode-logo` and added new SVG logo.
@n3-rd n3-rd requested a review from travis as a code owner September 3, 2025 05:02
@n3-rd n3-rd changed the title Qr code upload Qr code for upload and referral sharing Sep 3, 2025
@n3-rd
Copy link
Author

n3-rd commented Sep 3, 2025

image image

Copy link
Member

@travis travis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR has significant formatting issues - I started to identify them but would like you to use your editing tools to take a pass before re-requesting review - most of these errors should be caught automatically by your tools

value,
size = 256,
ecLevel = 'H',
fgColor = '#f70000',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be the brand color - ideally it should just reference the Tailwind configs:

@n3-rd n3-rd requested a review from travis September 4, 2025 10:26
<>
<ReferralsList />
{referralLink ? (
{referralLink ? (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this trailing space

<div className="border border-hot-red rounded-full px-4 py-2 flex flex-row justify-between items-center">
<div>{referralLink}</div>
<div className="flex flex-row space-x-2">
<QRButton link={referralLink} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be indented, as should the line below this


export default function QRButton({ link }: { link: string }) {
const [open, setOpen] = useState(false)
const className = 'h-5 w-5 inline-block mr-1 align-middle'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only used in one place below, please inline it there

>
<QrCodeIcon
className={`${className} cursor-pointer`}
style={{ marginTop: -4 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't use style - Tailwind can handle negative margins just fine:

https://tailwindcss.com/docs/margin

</button>

<StorachaQRCode value={link} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be indented

value,
size = 256,
ecLevel = 'H',
fgColor = '#E91315',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment here explaining where this color comes from

@n3-rd n3-rd requested a review from travis September 27, 2025 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants