SNS 링크 저장 복구 v1.5.41
This commit is contained in:
@@ -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 }))
|
||||
|
||||
Reference in New Issue
Block a user