ok
This commit is contained in:
@@ -200,6 +200,8 @@ const Dashboard = () => {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
|
try{
|
||||||
console.log(data);
|
console.log(data);
|
||||||
setDiscussedTopics(data[0]?.graph[0]?.json?.result?.topics)
|
setDiscussedTopics(data[0]?.graph[0]?.json?.result?.topics)
|
||||||
setFollowUps(data[0]?.graph[0]?.json?.result?.interested_users)
|
setFollowUps(data[0]?.graph[0]?.json?.result?.interested_users)
|
||||||
@@ -212,6 +214,7 @@ const Dashboard = () => {
|
|||||||
sesi,
|
sesi,
|
||||||
}));
|
}));
|
||||||
setRawData(rawDataArray);
|
setRawData(rawDataArray);
|
||||||
|
|
||||||
let totalSessions = new Set();
|
let totalSessions = new Set();
|
||||||
let botMessages = 0;
|
let botMessages = 0;
|
||||||
|
|
||||||
@@ -228,6 +231,10 @@ const Dashboard = () => {
|
|||||||
totalChats: totalSessions.size,
|
totalChats: totalSessions.size,
|
||||||
botMessages,
|
botMessages,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
setLoading(false); // ⬅️ Setelah berhasil, hilangkan loading
|
setLoading(false); // ⬅️ Setelah berhasil, hilangkan loading
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -430,7 +437,7 @@ const Dashboard = () => {
|
|||||||
for (const key of selectedKeys) {
|
for (const key of selectedKeys) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://bot.kediritechnopark.com/webhook/files/download?key=${encodeURIComponent(key)}`,
|
`https://bot.kediritechnopark.com/webhook/dermalounge/files/download?key=${encodeURIComponent(key)}`,
|
||||||
{
|
{
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -472,7 +479,7 @@ const Dashboard = () => {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file, file.name);
|
formData.append('file', file, file.name);
|
||||||
|
|
||||||
const response = await fetch('https://bot.kediritechnopark.com/webhook/files/upload', {
|
const response = await fetch('https://bot.kediritechnopark.com/webhook/dermalounge/files/upload', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
@@ -520,7 +527,7 @@ const Dashboard = () => {
|
|||||||
for (const key of selectedKeys) {
|
for (const key of selectedKeys) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://bot.kediritechnopark.com/webhook/files/delete?key=${encodeURIComponent(key)}`,
|
`https://bot.kediritechnopark.com/webhook/dermalounge/files/delete?key=${encodeURIComponent(key)}`,
|
||||||
{
|
{
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const ProfileTab = () => {
|
|||||||
const [profileTemp, setProfileTemp] = useState({});
|
const [profileTemp, setProfileTemp] = useState({});
|
||||||
|
|
||||||
const licenses = [
|
const licenses = [
|
||||||
{ id: 1, type: "Current Subscription", number: "DRML-2025-AI001", validUntil: "June 30 2025" },
|
{ id: 1, type: "Monthly Subscription", number: "DRML-2025-AI001", validUntil: "July 31 2025" },
|
||||||
];
|
];
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -146,7 +146,7 @@ const ProfileTab = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<img src={profile?.image || '/no-brand.jpg'} alt="Bot Avatar" />
|
<img src={profile?.image || '/dermalounge.jpg'} alt="Bot Avatar" />
|
||||||
<div>
|
<div>
|
||||||
<h1 className={styles.h1}>Dermalounge AI Admin Profile</h1>
|
<h1 className={styles.h1}>Dermalounge AI Admin Profile</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user