Skip to content

Commit 6f3b701

Browse files
committed
fix: fixes for navbar back button vertical alignment and not showing diff if no data entered
1 parent 8a40a2e commit 6f3b701

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

components/navbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<header class="fixed top-0 left-0 right-0 bg-white shadow-lg">
3-
<div class="container flex h-full py-4 m-auto">
4-
<div v-if="showBackButton" class="items-center mr-4">
3+
<div class="container flex items-center h-full py-4 m-auto">
4+
<div v-if="showBackButton" class="mr-4">
55
<NuxtLink to="/">
66
<svg
77
class="w-6 h-6"

pages/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
></textarea>
1616
<div class="self-end w-full text-center">
1717
<button
18-
class="w-64 px-4 py-3 text-white transition-transform transform bg-blue-600 rounded-md shadow-lg outline-none focus:ring-4 active:scale-y-75"
18+
class="inline-flex items-center justify-center w-48 px-4 py-2 text-white transition-transform transform bg-blue-600 rounded-md shadow-lg outline-none focus:ring-4 active:scale-y-75"
1919
>
2020
Compare
2121
</button>
@@ -45,6 +45,9 @@ export default Vue.extend({
4545
'rhs'
4646
) as HTMLTextAreaElement
4747
const rhs: string = rhsTextArea?.value || ''
48+
if (!lhs || !rhs) {
49+
return
50+
}
4851
const originalLhs = lhs.split('\n')
4952
const originalRhs = rhs.split('\n')
5053
const diff = originalLhs.map((x, i) => {

0 commit comments

Comments
 (0)