link back to login at register page

This commit is contained in:
2025-12-28 17:28:32 +01:00
parent 530931764d
commit a726922443
+15 -1
View File
@@ -7,6 +7,9 @@
<button type="submit">Register</button>
<p v-if="error" class="error">{{ error }}</p>
<p v-if="success" class="success">{{ success }}</p>
<p class="back-to-login">
<router-link to="/">Back to Login</router-link>
</p>
</form>
</template>
@@ -26,7 +29,7 @@ export default {
methods: {
async register() {
try {
const response = await API.post('/api/register', {
const response = await API.post('/register', {
username: this.username,
password: this.password,
email: this.email
@@ -50,4 +53,15 @@ export default {
.success {
color: green;
}
.back-to-login {
margin-top: 15px;
text-align: center;
}
.back-to-login a {
color: #1da766;
text-decoration: none;
}
.back-to-login a:hover {
text-decoration: underline;
}
</style>