feat: add events app + "multi-tenants" aka multi-events
This commit is contained in:
@@ -4,20 +4,28 @@ import { storeToRefs } from "pinia";
|
||||
import { useMarketStore } from "./stores/market";
|
||||
import MarketCard from "./components/MarketCard.vue";
|
||||
import UserBets from "./components/UserBets.vue";
|
||||
import { provideEventPath } from "./composables/useEventPath";
|
||||
|
||||
interface Props {
|
||||
eventPath: string;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
provideEventPath(props.eventPath);
|
||||
|
||||
const marketStore = useMarketStore();
|
||||
const { markets, userInfo, isLoading } = storeToRefs(marketStore);
|
||||
|
||||
const goHome = () => {
|
||||
window.location.href = "/";
|
||||
window.location.href = `/${props.eventPath}/`;
|
||||
};
|
||||
|
||||
const reloadPage = async () => {
|
||||
await marketStore.refreshPage();
|
||||
await marketStore.refreshPage(props.eventPath);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
marketStore.initializeMarketPage();
|
||||
marketStore.initializeMarketPage(props.eventPath);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user