Skip to content

Commit

Permalink
fix id issue
Browse files Browse the repository at this point in the history
  • Loading branch information
roppazvan committed Dec 16, 2024
1 parent 5d5fab9 commit d9e0bd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function getProjectData(id: string, orgId: string, client: any): Promise<P
const selectedTokenSets = theme?.selectedTokenSets;

return {
id: theme?.name as string,
id: `${group}-${theme?.name}` as string,
name: theme?.name as string,
group,
selectedTokenSets,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function themeListToTree(items: ThemeObjectsList) {
acc.splice(parentIndex + childrenLength + 1, 0, {
isLeaf: true,
value: curr,
key: curr.name,
key: curr.id,
parent: curr?.group ?? INTERNAL_THEMES_NO_GROUP,
path: `${curr?.group ?? INTERNAL_THEMES_NO_GROUP}/${curr.name}`,
level: 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/tokens-studio-for-figma/src/utils/tokenHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ true,

export function getOverallConfig(themes: ThemeObject[], selectedThemes: string[]) {
return selectedThemes.reduce((acc, themeId) => {
const currentTheme = themes.find((theme) => theme.name === themeId);
const currentTheme = themes.find((theme) => theme.id === themeId);
if (!currentTheme) return acc;

Object.entries(currentTheme.selectedTokenSets).forEach(([tokenSet, status]) => {
Expand Down

0 comments on commit d9e0bd5

Please sign in to comment.