mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-19 11:23:30 +00:00
feat(nav, blog) new ThemeSwitcher, also several updates on ui
This commit is contained in:
8 files changed
+159
-100
No files matched your search
@@ -1,8 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React from 'react';
|
||||
import { Pagination as NextUIPagination } from '@nextui-org/react';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useScreenSizeTrigger } from '@/app/public/screenSizeTrigger';
|
||||
|
||||
const Pagination = ({ total }: {
|
||||
total: number,
|
||||
@@ -12,23 +13,7 @@ const Pagination = ({ total }: {
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const maxMobileWidth: number = 768;
|
||||
const [ isMobile, setIsMobile ] = useState(false);
|
||||
useEffect(() => {
|
||||
const updateMobileWidth = () => {
|
||||
if (window.innerWidth <= maxMobileWidth) {
|
||||
setIsMobile(true);
|
||||
} else {
|
||||
setIsMobile(false);
|
||||
}
|
||||
};
|
||||
updateMobileWidth();
|
||||
window.addEventListener('resize', updateMobileWidth);
|
||||
return () => {
|
||||
window.removeEventListener('resize', updateMobileWidth);
|
||||
};
|
||||
|
||||
}, []);
|
||||
const isMobile = useScreenSizeTrigger('md');
|
||||
|
||||
return (
|
||||
<div className={ 'w-full p-4 pt-6 flex justify-center' }>
|
||||
|
||||
Reference in new issue
Block a user