- Install dependencies
pnpm add @keystatic/core @keystatic/next
- Add Keystatic page to your Next.js app
--- | |
description: | |
globs: | |
alwaysApply: true | |
--- | |
# Client Development Guidelines | |
## UI Component Library | |
**ALWAYS check the UI component library FIRST** before creating new components or using HTML elements directly. |
export interface Welcome { | |
count: number; | |
next: string; | |
previous: null; | |
results: Result[]; | |
} | |
export interface Result { | |
anggotaid: number; | |
umur: number | null; |
# .github/workflows/clean.yml | |
name: Clean up Docker Registry | |
on: | |
schedule: | |
- cron: "0 0 * * *" # every day, see https://crontab.guru | |
env: | |
DOCKER_REGISTRY: "your-docker-registry" |
function fckYou() { | |
var hiddenElements = document.querySelectorAll('[style="display: none;"]'); | |
// Loop through all hidden elements starting from the second one (index 1) | |
for (var i = 1; i < hiddenElements.length; i++) { | |
hiddenElements[i].style.cssText = ''; // Set the style to empty | |
} | |
} | |
fckYou() |
function vote(rating) { | |
const selector = `[data-rating-value="${rating}"]`; | |
const elements = document.querySelectorAll(selector); | |
if (elements.length > 0) { | |
elements.forEach((element) => { | |
element.click(); | |
console.log(`Clicked on rating ${rating}!`); | |
}); | |
} else { |
import { z } from "zod"; | |
const mobilSchema = z.object({ | |
type: z.literal("mobil"), | |
jumlahPenumpang: z.number().min(1).max(6), | |
}); | |
const motorSchema = z.object({ | |
type: z.literal("motor"), | |
jumlahPenumpang: z.number().min(1).max(2), |
import { JsonViewer } from "@textea/json-viewer"; | |
import { type FC, type KeyboardEvent, useEffect, useState } from "react"; | |
interface Props { | |
code: unknown; | |
} | |
declare global { | |
interface WindowEventMap { | |
keydown: KeyboardEvent<HTMLInputElement>; |
// Prevents additional console window on Windows in release, DO NOT REMOVE!! | |
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | |
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command | |
#[tauri::command] | |
fn greet(name: &str) -> String { | |
format!("Hello, {}! You've been greeted from Rust!", name) | |
} | |
use tauri::{Manager, SystemTray, SystemTrayEvent, SystemTrayMenu}; |
// "chakra-react-select": "^4.6.0" | |
<Select | |
menuPortalTarget={typeof window !== "undefined" && document.body} | |
menuShouldBlockScroll={true} | |
menuPosition="fixed" | |
// ... other props | |
/> | |
// https://stackoverflow.com/a/64973481 |