SNS 링크 저장 복구 v1.5.41

This commit is contained in:
2026-06-02 17:47:15 +09:00
parent b3c7f26d10
commit 21d01632be
12 changed files with 44 additions and 24 deletions

View File

@@ -126,6 +126,14 @@ export const normalizeSocialLinkItem = (item, index = 0) => {
* @returns {Array<{ id: string, icon: string, label: string, url: string, iconSvg: string }>} 정리된 SNS 링크 목록
*/
export const normalizeSocialLinks = (value) => {
if (typeof value === 'string') {
try {
return normalizeSocialLinks(JSON.parse(value))
} catch {
return []
}
}
const source = Array.isArray(value)
? value
: Object.entries(value && typeof value === 'object' ? value : {}).map(([icon, url]) => ({ icon, url }))