From ab5e5f4bdf40b5bc1ccf82dc1b4aca94d5171ec3 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 4 Jan 2022 13:07:15 +0100 Subject: refactor(sharing): avoid nested template literals This improves readability. I also rename a variable to avoid duplicate between global scope and useEffect scope. --- src/components/Notice/Notice.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/Notice/Notice.tsx') diff --git a/src/components/Notice/Notice.tsx b/src/components/Notice/Notice.tsx index c941bf9..472efa5 100644 --- a/src/components/Notice/Notice.tsx +++ b/src/components/Notice/Notice.tsx @@ -10,8 +10,10 @@ const Notice = ({ children: ReactNode; type: NoticeType; }) => { + const withModifier = `message--${type}`; + return ( -
+
{children}
); -- cgit v1.2.3