File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,19 @@ import { RouterLink } from 'vue-router';
1616</template >
1717
1818<script lang="ts">
19- import { defineComponent , type PropType } from ' vue' ;
19+ import { defineComponent , inject , type PropType } from ' vue' ;
2020import { type Event } from ' @/models' ;
2121import { format } from ' date-fns' ;
2222import { useScreenStore } from ' @/stores/screen' ;
2323
2424export default defineComponent ({
2525 props: {
26- event: Object as PropType <Event >,
27- isInPast: Boolean
26+ event: Object as PropType <Event >
2827 },
2928 data() {
3029 let screenStore = useScreenStore ();
3130 return {
31+ historyMode: inject (' historyMode' ) as Boolean ,
3232 screenStore
3333 };
3434 },
@@ -38,9 +38,11 @@ export default defineComponent({
3838 return data ? format (data , ' MM/dd/yyyy hh:mm a' ) : ' N/A' ;
3939 },
4040 eventPath() {
41- if (this .$props . isInPast ) {
41+ if (this .historyMode ) {
4242 return ` /history/${this .$props .event ?.id } ` ;
43- } else return ` ${this .$props .event ?.id } ` ;
43+ } else {
44+ return ` ${this .$props .event ?.id } `
45+ }
4446 }
4547 }
4648});
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ const eventStore = useEventStore();
2727 v-for =" (event, index) in eventStore.events"
2828 :event =" event"
2929 :key =" index"
30- :is-in-past =" showPast"
3130 @click =" selectEvent()"
3231 />
3332 <CreateEventButton v-if =" !showPast" />
You can’t perform that action at this time.
0 commit comments