Skip to content

Commit

Permalink
refactor: Update AttributeSelections component to use VariationAttrib…
Browse files Browse the repository at this point in the history
…ute type
  • Loading branch information
scottyzen committed Aug 19, 2024
1 parent ec86806 commit ed4fa5f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface Props {
const { attributes, defaultAttributes } = defineProps<Props>();
const emit = defineEmits(['attrs-changed']);
const activeVariations = ref<Attribute[]>([]);
const activeVariations = ref<VariationAttribute[]>([]);
const getSelectedName = (attr: any, activeVariation: VariationAttribute) => {
if (attr?.terms?.nodes) {
Expand All @@ -18,7 +18,7 @@ const getSelectedName = (attr: any, activeVariation: VariationAttribute) => {
};
const updateAttrs = () => {
const selectedVariations = attributes.map((row): Attribute => {
const selectedVariations = attributes.map((row): VariationAttribute => {
const radioValue = document.querySelector(`.name-${row.name}:checked`) as HTMLInputElement;
const dropdownValue = document.querySelector(`#${row.name}`) as HTMLSelectElement;
const name = row.name.charAt(0).toLowerCase() + row.name.slice(1);
Expand Down

0 comments on commit ed4fa5f

Please sign in to comment.