forked from jsnbuchanan/crowd-funder-for-time-pwa
Adding a less complex router
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
|
||||
><fa icon="chevron-left" class="fa-fw"></fa
|
||||
></router-link>
|
||||
|
||||
[New/Edit] Project
|
||||
</h1>
|
||||
</div>
|
||||
@@ -39,7 +38,7 @@
|
||||
type="text"
|
||||
placeholder="Project Name"
|
||||
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
|
||||
v-modal="projectName"
|
||||
v-model="projectName"
|
||||
/>
|
||||
|
||||
<textarea
|
||||
@@ -134,6 +133,12 @@ export default class NewEditProjectView extends Vue {
|
||||
try {
|
||||
const resp = await this.axios.post(url, payload, { headers });
|
||||
console.log(resp.status, resp.data);
|
||||
const route = {
|
||||
name: "project",
|
||||
params: { projectId: resp.data },
|
||||
};
|
||||
console.log(route);
|
||||
this.$router.push(route);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user