From 4b0d0978db88613a81446fcda6074e8981aaef9f Mon Sep 17 00:00:00 2001 From: Vlad Yanchevsky Date: Sat, 13 Jan 2024 14:01:04 +0100 Subject: [PATCH] Add "use client" for icons --- packages/react-icons/convert-font.js | 1 + packages/react-icons/convert.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-icons/convert-font.js b/packages/react-icons/convert-font.js index 5f737fc9f1..1018310546 100644 --- a/packages/react-icons/convert-font.js +++ b/packages/react-icons/convert-font.js @@ -118,6 +118,7 @@ async function processFolder(srcPath, codepointMapDestFolder, resizable) { for (const chunk of iconChunks) { chunk.unshift(`import {createFluentFontIcon} from "../../utils/fonts/createFluentFontIcon";`) + chunk.unshift(`"use client";`); } /** @type string[] */ diff --git a/packages/react-icons/convert.js b/packages/react-icons/convert.js index 20c7852510..9b44fe5b4f 100644 --- a/packages/react-icons/convert.js +++ b/packages/react-icons/convert.js @@ -137,6 +137,7 @@ function processFolder(srcPath, destPath, resizable) { for(const chunk of iconChunks) { chunk.unshift(`import { createFluentIcon } from "../utils/createFluentIcon";`); chunk.unshift(`import type { FluentIcon } from "../utils/createFluentIcon";`); + chunk.unshift(`"use client";`); } /** @type string[] */