Rails.application.routes.draw do
concern :tabs do
get :profile, on: :collection
get :billing, on: :collection
get :security, on: :collection
end
import { startOfDay, isToday, isYesterday, format } from 'date-fns';
export interface ChatMessage {
id: string;
senderId: string;
senderName: string;
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["dialog", "message"]
connect() {
export function clamp(value, min, max) {
return Math.min(Math.max(value, min), max);
}
export function move(list, from, to) {
const next = list.slice();
import SwiftUI
struct AnimationExamplesView: View {
@State private var isExpanded = false
@State private var rotation: Double = 0
@State private var scale: CGFloat = 1.0
import { createContext } from "react";
export type ToastVariant = "info" | "success" | "error";
export interface Toast {
id: string;
import { useCallback, useEffect, useRef, useState } from "react";
export function useIntersectionObserver(options?: IntersectionObserverInit) {
const [isIntersecting, setIsIntersecting] = useState(false);
const nodeRef = useRef<Element | null>(null);
const optionsKey = JSON.stringify(options ?? {});
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
export interface ConfirmDialogData {
title: string;
message: string;
import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';
import { ScrollingModule } from '@angular/cdk/scrolling';
import { FormsModule } from '@angular/forms';
import { Contact, ContactStore } from './contact.store';
@Component({
# Gemfile
gem 'view_component'
# app/components/button_component.rb
class ButtonComponent < ViewComponent::Base
VARIANTS = %w[primary secondary danger].freeze
import React from 'react';
import { useToasts } from './useToasts';
export function Toaster() {
const { toasts, dismiss } = useToasts();
import { RefObject, useEffect, useRef } from "react";
type Handler = (event: MouseEvent | TouchEvent) => void;
export function useClickOutside<T extends HTMLElement>(
ref: RefObject<T>,