Skip to content

Commit 04ef85d

Browse files
committed
Fix linting
1 parent 5fd5ef3 commit 04ef85d

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/pages/News/NewsDetailPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const NewsDetailPage: React.FC = () => {
2525
const timer = setTimeout(() => {
2626
setIsPathReady(true);
2727
}, 50);
28-
28+
2929
return () => clearTimeout(timer);
3030
}, []);
3131

@@ -65,7 +65,9 @@ const NewsDetailPage: React.FC = () => {
6565
// Image modal setup
6666
useEffect(() => {
6767
if (!isLoading && post && contentRef.current) {
68-
const images = contentRef.current.querySelectorAll('img[data-zoomable="true"]');
68+
const images = contentRef.current.querySelectorAll(
69+
'img[data-zoomable="true"]',
70+
);
6971
const clickHandlers: (() => void)[] = [];
7072

7173
images.forEach((img) => {

src/pages/News/NewsPage.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
const NewsPage: React.FC = () => {
1515
const navigate = useNavigate();
1616
const { category } = useParams<{ category?: string }>();
17-
17+
1818
const [isPathReady, setIsPathReady] = useState<boolean>(false);
1919
const [activeCategory, setActiveCategory] = useState<string>('');
2020
const [posts, setPosts] = useState<Post[]>([]);
@@ -33,7 +33,7 @@ const NewsPage: React.FC = () => {
3333
const timer = setTimeout(() => {
3434
setIsPathReady(true);
3535
}, 50);
36-
36+
3737
return () => clearTimeout(timer);
3838
}, []);
3939

@@ -42,14 +42,14 @@ const NewsPage: React.FC = () => {
4242
if (!isPathReady) return;
4343

4444
let initialCategory = 'COMMUNITY NEWS';
45-
45+
4646
if (category) {
4747
const formattedCategory = category.toUpperCase().replace(/-/g, ' ');
4848
if (validCategories.includes(formattedCategory)) {
4949
initialCategory = formattedCategory;
5050
}
5151
}
52-
52+
5353
setActiveCategory(initialCategory);
5454
}, [category, validCategories, isPathReady]);
5555

@@ -84,7 +84,7 @@ const NewsPage: React.FC = () => {
8484
// Update URL when category changes
8585
useEffect(() => {
8686
if (!isPathReady || !activeCategory) return;
87-
87+
8888
const categoryPath = activeCategory.toLowerCase().replace(/\s+/g, '-');
8989
if (category !== categoryPath) {
9090
navigate(`/news/${categoryPath}`, { replace: true });

0 commit comments

Comments
 (0)