Skip to content

Commit

Permalink
fix: sonar qube cloud issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Dec 21, 2024
1 parent 690f3d2 commit ddbffec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions components/Signin/TipModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface TipModalProps {
onOk: () => void;
}

function TipModal({ isOpen, onClose, onOk }: TipModalProps) {
function TipModal({ isOpen, onClose, onOk }: Readonly<TipModalProps>) {
const id = useId();
const describedby = `tip-modal-${id}`;

Expand All @@ -21,7 +21,10 @@ function TipModal({ isOpen, onClose, onOk }: TipModalProps) {
title="帳號註冊成功!"
describedby={describedby}
>
<p id={describedby} className="mt-2 mb-6 text-center text-basic-400 body-sm">
<p
id={describedby}
className="mt-2 mb-6 text-center text-basic-400 body-sm"
>
記得到信箱確認收到帳號驗證信件,並點選驗證Email按鈕,如果沒有看到信件,可以到垃圾桶確認。
</p>
<Image
Expand All @@ -31,7 +34,8 @@ function TipModal({ isOpen, onClose, onOk }: TipModalProps) {
height="280"
/>
<p className="my-6 text-center text-basic-400 body-sm">
我們會公開你的<strong className="font-bold">個人檔案</strong>,填寫完整的資料,才能讓其他夥伴們更了解你喔!
我們會公開你的<strong className="font-bold">個人檔案</strong>
,填寫完整的資料,才能讓其他夥伴們更了解你喔!
</p>
<div className="flex gap-2">
<button
Expand Down
2 changes: 1 addition & 1 deletion utils/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function createStorage<T>(key: string, storage = localStorage) {
const set = (value: T) => storage.setItem(key, JSON.stringify(value));
const get = (): T | undefined => {
try {
return JSON.parse(storage.getItem(key) || 'undefined');
return JSON.parse(storage.getItem(key) ?? 'undefined');
} catch {
return undefined;
}
Expand Down

0 comments on commit ddbffec

Please sign in to comment.