Built with RocketKit
Published on January 26, 2024

Welcome to ACME !

Thomas LAUV
Thomas LAUV
@thomaslauv
Welcome to ACME !

Creating the Chat Logic 🚀

// src/controllers/chat.ts
export default class ChatController {
  private static instance: ChatController;
  private constructor() {}

  static getInstance(): ChatController {
    if (!ChatController.instance) {
      ChatController.instance = new ChatController();
    }
    return ChatController.instance;
  }
}
// src/controllers/chat.ts
export default class ChatController {
  private static instance: ChatController;
  private constructor() {}

  static getInstance(): ChatController {
    if (!ChatController.instance) {
      ChatController.instance = new ChatController();
    }
    return ChatController.instance;
  }
}

See Google

Let's create a file called chat.ts in the src/controllers directory and let's get to work.

<script lang="ts">import * as Accordion from "$lib/components/ui/accordion";
</script>

<Accordion.Root>
	<Accordion.Item value="item-1">
		<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
		<Accordion.Content>Yes. It adheres to the WAI-ARIA design pattern.</Accordion.Content>
	</Accordion.Item>
</Accordion.Root>
<script lang="ts">import * as Accordion from "$lib/components/ui/accordion";
</script>

<Accordion.Root>
	<Accordion.Item value="item-1">
		<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
		<Accordion.Content>Yes. It adheres to the WAI-ARIA design pattern.</Accordion.Content>
	</Accordion.Item>
</Accordion.Root>
npm run dev
npm run dev
© 2024 RocketKit All rights reserved.