Upload folder using huggingface_hub
Browse files
client/src/components/HitokotoBar.tsx
CHANGED
|
@@ -55,7 +55,7 @@ const HitokotoBar: React.FC = () => {
|
|
| 55 |
if (!hidden && !quote) {
|
| 56 |
fetchQuote();
|
| 57 |
}
|
| 58 |
-
}, [hidden]);
|
| 59 |
|
| 60 |
if (hidden) return null;
|
| 61 |
|
|
|
|
| 55 |
if (!hidden && !quote) {
|
| 56 |
fetchQuote();
|
| 57 |
}
|
| 58 |
+
}, [hidden, quote]);
|
| 59 |
|
| 60 |
if (hidden) return null;
|
| 61 |
|
client/src/components/Layout.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
import { Link, useLocation } from 'react-router-dom';
|
| 3 |
// We keep heroicons for fallback, but nav uses custom SVGs from /public/icons
|
| 4 |
-
import {
|
| 5 |
import HitokotoBar from './HitokotoBar';
|
| 6 |
import { api } from '../services/api';
|
| 7 |
|
|
@@ -13,8 +13,7 @@ interface User {
|
|
| 13 |
|
| 14 |
const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
| 15 |
const location = useLocation();
|
| 16 |
-
const [isTransitioning
|
| 17 |
-
const previousPathRef = useRef(location.pathname);
|
| 18 |
const userData = localStorage.getItem('user');
|
| 19 |
const user: User | null = userData ? JSON.parse(userData) : null;
|
| 20 |
const [unreadCount, setUnreadCount] = useState<number>(0);
|
|
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
import { Link, useLocation } from 'react-router-dom';
|
| 3 |
// We keep heroicons for fallback, but nav uses custom SVGs from /public/icons
|
| 4 |
+
import { PowerIcon } from '@heroicons/react/24/outline';
|
| 5 |
import HitokotoBar from './HitokotoBar';
|
| 6 |
import { api } from '../services/api';
|
| 7 |
|
|
|
|
| 13 |
|
| 14 |
const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
| 15 |
const location = useLocation();
|
| 16 |
+
const [isTransitioning] = useState(false);
|
|
|
|
| 17 |
const userData = localStorage.getItem('user');
|
| 18 |
const user: User | null = userData ? JSON.parse(userData) : null;
|
| 19 |
const [unreadCount, setUnreadCount] = useState<number>(0);
|
client/src/pages/TutorialTasks.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
| 15 |
ArrowTopRightOnSquareIcon,
|
| 16 |
ArrowsRightLeftIcon
|
| 17 |
} from '@heroicons/react/24/outline';
|
| 18 |
-
import ReactDOM from 'react-dom';
|
| 19 |
|
| 20 |
interface TutorialTask {
|
| 21 |
_id: string;
|
|
@@ -85,7 +85,7 @@ const TutorialTasks: React.FC = () => {
|
|
| 85 |
normalized[targetIndex].position = posA;
|
| 86 |
|
| 87 |
// Optimistic UI update: swap in local state immediately for smoother UX
|
| 88 |
-
const prevState = tutorialTasks;
|
| 89 |
setTutorialTasks((prev) => {
|
| 90 |
const next = [...prev];
|
| 91 |
// find actual indices in full list and swap their relative order by updating their position fields
|
|
|
|
| 15 |
ArrowTopRightOnSquareIcon,
|
| 16 |
ArrowsRightLeftIcon
|
| 17 |
} from '@heroicons/react/24/outline';
|
| 18 |
+
// import ReactDOM from 'react-dom';
|
| 19 |
|
| 20 |
interface TutorialTask {
|
| 21 |
_id: string;
|
|
|
|
| 85 |
normalized[targetIndex].position = posA;
|
| 86 |
|
| 87 |
// Optimistic UI update: swap in local state immediately for smoother UX
|
| 88 |
+
// const prevState = tutorialTasks; // not used
|
| 89 |
setTutorialTasks((prev) => {
|
| 90 |
const next = [...prev];
|
| 91 |
// find actual indices in full list and swap their relative order by updating their position fields
|