From 80fb6c00e63c867dbe14ba84cb4b263b8013e827 Mon Sep 17 00:00:00 2001 From: Vlad Yanchevsky Date: Sun, 14 Jul 2024 04:16:38 +0200 Subject: [PATCH] Add "use client" for icons (#682) --- 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[] */