Skip to content

Commit

Permalink
fix: typo formater to formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedElmdary committed Sep 4, 2024
1 parent ae71b10 commit f67ee2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<template v-if="Array.isArray(msg)">
<FormatedLog v-for="item in msg" :depth="depth + 1" :key="item.id" :msg="item" />
<FormattedLog v-for="item in msg" :depth="depth + 1" :key="item.id" :msg="item" />
</template>

<template v-else-if="msg.type === 'Literal'">
Expand Down Expand Up @@ -29,7 +29,7 @@
<span v-html="msg.type === 'Array' ? '&#91; ' : '&#123; '" />
<div class="ml-4 d-flex" v-for="([key, item], index) in Object.entries(msg.value)" :key="item.id">
"{{ key }}":
<FormatedLog :depth="depth + 1" :msg="item" :coma="index !== Object.keys(msg.value).length - 1" is-prop />
<FormattedLog :depth="depth + 1" :msg="item" :coma="index !== Object.keys(msg.value).length - 1" is-prop />
</div>
<span v-html="msg.type === 'Array' ? ' &#93;' : ' &#125;'" /><span v-if="coma" v-text="','" />
</div>
Expand All @@ -50,7 +50,7 @@ export type MsgToken =
| { id: number; type: "Object"; value: { [key: string]: MsgToken } };
export default {
name: "FormatedLog",
name: "FormattedLog",
props: {
msg: { type: Object as PropType<MsgToken | MsgToken[]>, required: true },
depth: { type: Number, default: () => 0 },
Expand Down
6 changes: 3 additions & 3 deletions packages/playground/src/components/tf_log_formatter.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<FormatedLog :msg="parsedMsg" />
<FormattedLog :msg="parsedMsg" />
</template>

<script lang="ts">
import { computed, type PropType, toRef } from "vue";
import FormatedLog, { type MsgToken } from "./formated_log.vue";
import FormattedLog, { type MsgToken } from "./formatted_log.vue";
function parseMsg(msg?: any): MsgToken[] {
const _msg = msg || "";
Expand Down Expand Up @@ -78,7 +78,7 @@ function parseObject(idRef: { id: number }, obj: any): MsgToken {
export default {
name: "TfLogFormatter",
components: { FormatedLog },
components: { FormattedLog },
props: {
msg: { type: String as PropType<string | undefined | null>, required: true },
},
Expand Down

0 comments on commit f67ee2b

Please sign in to comment.