Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,8 @@ def main():
|
|
141 |
|
142 |
# Display the buttons for each URL
|
143 |
for url, name, emoji in zip(urls, url_names, url_emojis):
|
144 |
-
if st.button(f"{emoji} {name}"):
|
|
|
145 |
# Open the URL in a new browser tab using JavaScript
|
146 |
st.write('<script>window.open("'+url+'", "_blank");</script>', unsafe_allow_html=True)
|
147 |
# Update the history of clicks
|
|
|
141 |
|
142 |
# Display the buttons for each URL
|
143 |
for url, name, emoji in zip(urls, url_names, url_emojis):
|
144 |
+
#if st.button(f"{emoji} {name}"):
|
145 |
+
if st.button(f"{emoji} {name}", key=url): # using the URL as the unique key
|
146 |
# Open the URL in a new browser tab using JavaScript
|
147 |
st.write('<script>window.open("'+url+'", "_blank");</script>', unsafe_allow_html=True)
|
148 |
# Update the history of clicks
|