Skip to content

Commit

Permalink
fixes bug with nearby topic closing cyclomedia or eagleview
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrothwell committed Jan 30, 2025
1 parent f942c48 commit b56e729
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/topics/nearbyActivity/NearbyActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const currentNearbyDataType = computed(() => {
});
const setDataTypeInRouter = (newDataType) => {
router.push({ name: 'address-topic-and-data', params: { address: MainStore.currentAddress, topic: route.params.topic, data: newDataType } });
let startQuery = { ...route.query };
router.push({ name: 'address-topic-and-data', params: { address: MainStore.currentAddress, topic: route.params.topic, data: newDataType }, query: { ...startQuery }});
}
const selectedDataType = ref('nearby311');
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useRouting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useMainStore } from '@/stores/MainStore';

export default function useRouting() {
const routeApp = (router, route) => {
if (import.meta.env.VITE_DEBUG) console.log('routeApp, router:', router, 'route:', route);

const MainStore = useMainStore();
let startQuery = { ...route.query };
delete startQuery['address'];
delete startQuery['lat'];
delete startQuery['lng'];
if (import.meta.env.VITE_DEBUG) console.log('routeApp, router:', router, 'route:', route, 'startQuery:', startQuery);
if (!MainStore.currentAddress && MainStore.currentTopic == 'voting'){
if (import.meta.env.VITE_DEBUG) console.log('routeApp routing to topic because MainStore.currentTopic:', MainStore.currentTopic);
if (MainStore.currentLang) {
Expand Down

0 comments on commit b56e729

Please sign in to comment.