blob: 2122b755bb6067d73ef4ff5559281e4660960d84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"use client";
import { testFn, testLogin } from "@/actions/test";
import { useState } from "react";
export const Counter = () => {
const [count, setCount] = useState(0);
const handleIncrement = async () => {
setCount((c) => c + 1);
const res = await testFn("rofl");
console.log({ res });
const oof = testLogin({ name: "yago", creds: "xd" });
};
return (
<section className="border-blue-400 -mx-4 mt-4 rounded-sm border border-dashed p-4">
<div>Count: {count}</div>
<button
onClick={handleIncrement}
className="rounded-xs bg-black px-2 py-0.5 text-sm text-white"
>
Increment
</button>
</section>
);
};
|