awacke1 commited on
Commit
17a7688
·
1 Parent(s): 4b48230

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -185,7 +185,7 @@ def main():
185
  for i, data in enumerate(url_data):
186
  col = cols[i % num_cols]
187
  with col:
188
- if st.button(f"{data['emoji']} {data['name']}"):
189
  # Open the URL in a new browser tab using JavaScript
190
  st.write('<script>window.open("'+data['url']+'", "_blank");</script>', unsafe_allow_html=True)
191
  # Update the history of clicks
 
185
  for i, data in enumerate(url_data):
186
  col = cols[i % num_cols]
187
  with col:
188
+ if st.button(f"{emoji} {name}", key=url): # using the URL as the unique key
189
  # Open the URL in a new browser tab using JavaScript
190
  st.write('<script>window.open("'+data['url']+'", "_blank");</script>', unsafe_allow_html=True)
191
  # Update the history of clicks