first commit. working
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"use client";
|
||||
import React from 'react';
|
||||
|
||||
export default function SyncButton() {
|
||||
const handleSync = async () => {
|
||||
const res = await fetch('/api/sync');
|
||||
const json = await res.json();
|
||||
alert(json.message);
|
||||
};
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={handleSync}
|
||||
className="mb-4 px-4 py-2 border rounded"
|
||||
>
|
||||
Sync
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user