Update dependencies
This commit is contained in:
3
TODO.txt
Normal file
3
TODO.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Change page layout to tanstack router
|
||||||
|
Make raid layout page
|
||||||
|
Move providers to context and components to providers
|
||||||
1935
package-lock.json
generated
1935
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
52
package.json
52
package.json
@@ -10,38 +10,38 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullcalendar/core": "^6.1.17",
|
"@fullcalendar/core": "^6.1.19",
|
||||||
"@fullcalendar/daygrid": "^6.1.17",
|
"@fullcalendar/daygrid": "^6.1.19",
|
||||||
"@fullcalendar/interaction": "^6.1.17",
|
"@fullcalendar/interaction": "^6.1.19",
|
||||||
"@fullcalendar/react": "^6.1.17",
|
"@fullcalendar/react": "^6.1.19",
|
||||||
"@tailwindcss/vite": "^4.1.7",
|
"@tailwindcss/vite": "^4.1.18",
|
||||||
"@tanstack/react-query": "^5.77.0",
|
"@tanstack/react-query": "^5.90.12",
|
||||||
"@types/node": "^22.15.21",
|
"@types/node": "^25.0.3",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.13.2",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"react": "^19.1.0",
|
"react": "^19.2.3",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.2.3",
|
||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
"react-joyride": "^3.0.0-7",
|
"react-joyride": "^3.0.0-7",
|
||||||
"react-router": "^7.6.1",
|
"react-router": "^7.11.0",
|
||||||
"react-tooltip": "^5.28.1",
|
"react-tooltip": "^5.30.0",
|
||||||
"tailwindcss": "^4.1.7",
|
"tailwindcss": "^4.1.18",
|
||||||
"use-debounce": "^10.0.4",
|
"use-debounce": "^10.0.6",
|
||||||
"zod": "^3.25.28"
|
"zod": "^4.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.27.0",
|
"@eslint/js": "^9.39.2",
|
||||||
"@types/react": "^19.1.5",
|
"@types/react": "^19.2.7",
|
||||||
"@types/react-dom": "^19.1.5",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@vitejs/plugin-react": "^4.5.0",
|
"@vitejs/plugin-react": "^5.1.2",
|
||||||
"eslint": "^9.27.0",
|
"eslint": "^9.39.2",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
"eslint-plugin-react-refresh": "^0.4.20",
|
"eslint-plugin-react-refresh": "^0.4.26",
|
||||||
"globals": "^16.2.0",
|
"globals": "^16.5.0",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.32.1",
|
"typescript-eslint": "^8.50.0",
|
||||||
"vite": "^6.3.5"
|
"vite": "^7.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default function GameSelector({
|
|||||||
{
|
{
|
||||||
"rounded-t-lg border-t-2 border-b": index === 0,
|
"rounded-t-lg border-t-2 border-b": index === 0,
|
||||||
"rounded-b-lg border-b-2 border-t": index === games.length - 1,
|
"rounded-b-lg border-b-2 border-t": index === games.length - 1,
|
||||||
"border-y-1": index > 0 && index < games.length - 1,
|
"border-y": index > 0 && index < games.length - 1,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
onClick={() => setGame(searchGame)}
|
onClick={() => setGame(searchGame)}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default function FileInput({
|
|||||||
}){
|
}){
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="relative border-2 rounded-lg border-gray-500 h-24 mx-4 w-[28rem] z-0"
|
className="relative border-2 rounded-lg border-gray-500 h-24 mx-4 w-md z-0"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="absolute cursor-text left-0 -top-3 bg-white dark:bg-neutral-800 text-gray-500 mx-1 px-1"
|
className="absolute cursor-text left-0 -top-3 bg-white dark:bg-neutral-800 text-gray-500 mx-1 px-1"
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export default function NumberInput({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning. Use component library
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setMinValue(min ?? Number.MIN_VALUE);
|
setMinValue(min ?? Number.MIN_VALUE);
|
||||||
setMaxValue(max ?? Number.MAX_VALUE);
|
setMaxValue(max ?? Number.MAX_VALUE);
|
||||||
setInputValue(value ?? defaultValue ?? 0);
|
setInputValue(value ?? defaultValue ?? 0);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ export default function GamePage(){
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(gameQuery.status === "success"){
|
if(gameQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setGame(gameQuery.data);
|
setGame(gameQuery.data);
|
||||||
}
|
}
|
||||||
}, [ gameQuery ]);
|
}, [ gameQuery ]);
|
||||||
|
|||||||
@@ -19,11 +19,15 @@ export default function PersonPage(){
|
|||||||
const personQuery = useGetPerson(raidGroupId ?? "", personId ?? "", false);
|
const personQuery = useGetPerson(raidGroupId ?? "", personId ?? "", false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupQuery.status === "success"){
|
if(raidGroupQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidGroup(raidGroupQuery.data);
|
setRaidGroup(raidGroupQuery.data);
|
||||||
}
|
}
|
||||||
}, [ raidGroupQuery ]);
|
}, [ raidGroupQuery ]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(personQuery.status === "success"){
|
if(personQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPerson(personQuery.data);
|
setPerson(personQuery.data);
|
||||||
}
|
}
|
||||||
}, [ personQuery ]);
|
}, [ personQuery ]);
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ export default function RaidGroupPage(){
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupQuery.status === "success"){
|
if(raidGroupQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidGroup(raidGroupQuery.data);
|
setRaidGroup(raidGroupQuery.data);
|
||||||
}
|
}
|
||||||
}, [ raidGroupQuery ]);
|
}, [ raidGroupQuery ]);
|
||||||
|
|||||||
@@ -84,12 +84,16 @@ export function AuthProvider({
|
|||||||
|
|
||||||
//Try to get the token on page load
|
//Try to get the token on page load
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
void fetchToken();
|
void fetchToken();
|
||||||
}, [ fetchToken ]);
|
}, [ fetchToken ]);
|
||||||
|
|
||||||
//Update the tutorial status when fetched
|
//Update the tutorial status when fetched
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(tutorialsStatusQuery.status === "success"){
|
if(tutorialsStatusQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTutorialsStatus(tutorialsStatusQuery.data);
|
setTutorialsStatus(tutorialsStatusQuery.data);
|
||||||
}
|
}
|
||||||
}, [ tutorialsStatusQuery.status, tutorialsStatusQuery.data ]);
|
}, [ tutorialsStatusQuery.status, tutorialsStatusQuery.data ]);
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 1");
|
//console.log("hit 1");
|
||||||
if(raidGroupQuery.status === "success"){
|
if(raidGroupQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidGroup(raidGroupQuery.data);
|
setRaidGroup(raidGroupQuery.data);
|
||||||
}
|
}
|
||||||
}, [ raidGroupQuery.status, raidGroupQuery.data ]);
|
}, [ raidGroupQuery.status, raidGroupQuery.data ]);
|
||||||
@@ -57,6 +59,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 2");
|
//console.log("hit 2");
|
||||||
if(classGroupsQuery.status === "success"){
|
if(classGroupsQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setClassGroups(classGroupsQuery.data);
|
setClassGroups(classGroupsQuery.data);
|
||||||
}
|
}
|
||||||
}, [ classGroupsQuery.status, classGroupsQuery.data ]);
|
}, [ classGroupsQuery.status, classGroupsQuery.data ]);
|
||||||
@@ -64,6 +68,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 3");
|
//console.log("hit 3");
|
||||||
if(raidLayoutsQuery.status === "success"){
|
if(raidLayoutsQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidLayouts(raidLayoutsQuery.data);
|
setRaidLayouts(raidLayoutsQuery.data);
|
||||||
}
|
}
|
||||||
}, [ raidLayoutsQuery.status, raidLayoutsQuery.data ]);
|
}, [ raidLayoutsQuery.status, raidLayoutsQuery.data ]);
|
||||||
@@ -71,6 +77,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 4");
|
//console.log("hit 4");
|
||||||
if(peopleQuery.status === "success"){
|
if(peopleQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPeople(peopleQuery.data);
|
setPeople(peopleQuery.data);
|
||||||
setRoster(peopleQuery.data);
|
setRoster(peopleQuery.data);
|
||||||
}
|
}
|
||||||
@@ -79,6 +87,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 5");
|
//console.log("hit 5");
|
||||||
if(raidInstanceId && raidInstanceQuery.status === "success"){
|
if(raidInstanceId && raidInstanceQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidInstance(raidInstanceQuery.data);
|
setRaidInstance(raidInstanceQuery.data);
|
||||||
if(!raidInstanceQuery.data.raidLayoutId){
|
if(!raidInstanceQuery.data.raidLayoutId){
|
||||||
const newClassGroups: (ClassGroup | null)[] = [];
|
const newClassGroups: (ClassGroup | null)[] = [];
|
||||||
@@ -97,6 +107,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 6");
|
//console.log("hit 6");
|
||||||
if(selectedClassGroupsQuery.status === "success"){
|
if(selectedClassGroupsQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setSelectedClassGroups(selectedClassGroupsQuery.data);
|
setSelectedClassGroups(selectedClassGroupsQuery.data);
|
||||||
}
|
}
|
||||||
}, [ selectedClassGroupsQuery.status, selectedClassGroupsQuery.data ]);
|
}, [ selectedClassGroupsQuery.status, selectedClassGroupsQuery.data ]);
|
||||||
@@ -104,6 +116,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 7");
|
//console.log("hit 7");
|
||||||
if(personCharactersQuery.status === "success"){
|
if(personCharactersQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPersonCharacters(personCharactersQuery.data);
|
setPersonCharacters(personCharactersQuery.data);
|
||||||
}
|
}
|
||||||
}, [ personCharactersQuery.status, personCharactersQuery.data ]);
|
}, [ personCharactersQuery.status, personCharactersQuery.data ]);
|
||||||
@@ -111,6 +125,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 8");
|
//console.log("hit 8");
|
||||||
if(personCharacterXrefsQuery.status === "success"){
|
if(personCharacterXrefsQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPersonCharacterXrefs(personCharacterXrefsQuery.data);
|
setPersonCharacterXrefs(personCharacterXrefsQuery.data);
|
||||||
}
|
}
|
||||||
}, [ personCharacterXrefsQuery.status, personCharacterXrefsQuery.data, people ]);
|
}, [ personCharacterXrefsQuery.status, personCharacterXrefsQuery.data, people ]);
|
||||||
@@ -118,6 +134,8 @@ export default function RaidInstanceLayoutProvider({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//console.log("hit 9");
|
//console.log("hit 9");
|
||||||
if(raidLayoutQuery.status === "success"){
|
if(raidLayoutQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidLayout(raidLayoutQuery.data);
|
setRaidLayout(raidLayoutQuery.data);
|
||||||
}
|
}
|
||||||
}, [ raidLayoutQuery.status, raidLayoutQuery.data ]);
|
}, [ raidLayoutQuery.status, raidLayoutQuery.data ]);
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export function TimedModalProvider({
|
|||||||
const [ display, setDisplay ] = useState(false);
|
const [ display, setDisplay ] = useState(false);
|
||||||
const [ messages, setMessages ] = useState<React.ReactNode[]>([]);
|
const [ messages, setMessages ] = useState<React.ReactNode[]>([]);
|
||||||
const messagesRef = useRef<React.ReactNode[]>(messages);
|
const messagesRef = useRef<React.ReactNode[]>(messages);
|
||||||
|
//TODO: Fix this error
|
||||||
|
// eslint-disable-next-line react-hooks/refs
|
||||||
messagesRef.current = messages;
|
messagesRef.current = messages;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ export default function AdminAccountsTab(){
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(accountsCountQuery.status === "success"){
|
if(accountsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ accountsCountQuery ]);
|
}, [ accountsCountQuery ]);
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ export default function PasswordResetDisplay(){
|
|||||||
if(updatePasswordStatus === "success"){
|
if(updatePasswordStatus === "success"){
|
||||||
addSuccessMessage("Password updated successfully");
|
addSuccessMessage("Password updated successfully");
|
||||||
updatePasswordReset();
|
updatePasswordReset();
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setCurrentPassword("");
|
setCurrentPassword("");
|
||||||
setNewPassword("");
|
setNewPassword("");
|
||||||
setConfirmPassword("");
|
setConfirmPassword("");
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ export default function RaidGroupAccountsTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(accountsCountQuery.data){
|
if(accountsCountQuery.data){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ accountsCountQuery.data ]);
|
}, [ accountsCountQuery.data ]);
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export default function AccountModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setUsername(account?.username ?? "");
|
setUsername(account?.username ?? "");
|
||||||
setEmail(account?.email ?? "");
|
setEmail(account?.email ?? "");
|
||||||
setPassword(account?.password ?? "");
|
setPassword(account?.password ?? "");
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export default function AccountRaidGroupPermissionsModal({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupPermissionsQuery.status === "success"){
|
if(raidGroupPermissionsQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setCurrentPermission(raidGroupPermissionsQuery.data);
|
setCurrentPermission(raidGroupPermissionsQuery.data);
|
||||||
}
|
}
|
||||||
else if(raidGroupPermissionsQuery.status === "error"){
|
else if(raidGroupPermissionsQuery.status === "error"){
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ export default function CalendarEventModal({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(calendarEvent){
|
if(calendarEvent){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setEventName(calendarEvent?.eventName ?? "");
|
setEventName(calendarEvent?.eventName ?? "");
|
||||||
setEventDescription(calendarEvent?.eventDescription ?? "");
|
setEventDescription(calendarEvent?.eventDescription ?? "");
|
||||||
setEventStartDate(calendarEvent.eventStartDate);
|
setEventStartDate(calendarEvent.eventStartDate);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function ClassGroupSkeleton(): React.ReactNode[]{
|
|||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="classes"
|
key="classes"
|
||||||
className={`h-6 w-[64rem] ${elementBg}`}
|
className={`h-6 w-5xl ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="actions"
|
key="actions"
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export default function ClassGroupsTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(classGroupsCountQuery.status === "success"){
|
if(classGroupsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(classGroupsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(classGroupsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ classGroupsCountQuery ]);
|
}, [ classGroupsCountQuery ]);
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ export default function ClassGroupModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setClassGroupName(classGroup?.classGroupName ?? "");
|
setClassGroupName(classGroup?.classGroupName ?? "");
|
||||||
setSelectedGameClassIds(selectedGameClasses.map(gc => gc.gameClassId ?? ""));
|
setSelectedGameClassIds(selectedGameClasses.map(gc => gc.gameClassId ?? ""));
|
||||||
}, [ display, classGroup, selectedGameClasses ]);
|
}, [ display, classGroup, selectedGameClasses ]);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default function SelectClassGroupModal({
|
|||||||
modalHeader="Select Class Group"
|
modalHeader="Select Class Group"
|
||||||
modalBody={
|
modalBody={
|
||||||
<div
|
<div
|
||||||
className="grid grid-cols-3 gap-4 w-[36rem]"
|
className="grid grid-cols-3 gap-4 w-xl"
|
||||||
style={{flex: "0 0 33.333333333%"}}
|
style={{flex: "0 0 33.333333333%"}}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ export default function AllGamesDisplay(){
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(gamesCountQuery.status === "success"){
|
if(gamesCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(gamesCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(gamesCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ gamesCountQuery ]);
|
}, [ gamesCountQuery ]);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default function GamesListSkeleton(){
|
|||||||
GameSkeleton(),
|
GameSkeleton(),
|
||||||
GameSkeleton(),
|
GameSkeleton(),
|
||||||
GameSkeleton(),
|
GameSkeleton(),
|
||||||
GameSkeleton(),
|
GameSkeleton()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export default function GameModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setGameName(game?.gameName ?? "");
|
setGameName(game?.gameName ?? "");
|
||||||
setGameIcon(game?.gameIcon ?? "");
|
setGameIcon(game?.gameIcon ?? "");
|
||||||
}, [ display, game, setGameName, setGameIcon ]);
|
}, [ display, game, setGameName, setGameIcon ]);
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export default function GameClassDisplay({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(gameClassCountQuery.status === "success"){
|
if(gameClassCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(gameClassCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(gameClassCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ gameClassCountQuery ]);
|
}, [ gameClassCountQuery ]);
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export default function GameClassModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setGameClassName(gameClass?.gameClassName ?? "");
|
setGameClassName(gameClass?.gameClassName ?? "");
|
||||||
setGameClassIcon(gameClass?.gameClassIcon);
|
setGameClassIcon(gameClass?.gameClassIcon);
|
||||||
setIconFile(null);
|
setIconFile(null);
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ export default function PersonDisplay({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(characterCountQuery.status === "success"){
|
if(characterCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(characterCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(characterCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ characterCountQuery ]);
|
}, [ characterCountQuery ]);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export function PersonSkeleton(): React.ReactNode[]{
|
|||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="characters"
|
key="characters"
|
||||||
className={`h-6 w-[48rem] ${elementBg}`}
|
className={`h-6 w-3xl ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="actions"
|
key="actions"
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export default function PersonTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(personCountQuery.status === "success"){
|
if(personCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(personCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(personCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ personCountQuery ]);
|
}, [ personCountQuery ]);
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export default function PersonModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPersonName(person?.personName ?? "");
|
setPersonName(person?.personName ?? "");
|
||||||
setDiscordId(person?.discordId ?? "");
|
setDiscordId(person?.discordId ?? "");
|
||||||
}, [ display, person, raidGroupId, setPersonName, setDiscordId ]);
|
}, [ display, person, raidGroupId, setPersonName, setDiscordId ]);
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ function PersonCharacterSkeleton(): React.ReactNode[]{
|
|||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="comments"
|
key="comments"
|
||||||
className={`h-6 w-[32rem] ${elementBg}`}
|
className={`h-6 w-lg ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="actions"
|
key="actions"
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ export default function PersonCharacterModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setCharacterName(personCharacter?.characterName ?? "");
|
setCharacterName(personCharacter?.characterName ?? "");
|
||||||
setGameClassId(personCharacter?.gameClassId);
|
setGameClassId(personCharacter?.gameClassId);
|
||||||
setCharacterRating(personCharacter?.characterRating);
|
setCharacterRating(personCharacter?.characterRating);
|
||||||
|
|||||||
@@ -118,9 +118,7 @@ export default function PersonCharacterSelectorModal({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Tabs */}
|
{/* Tabs */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center my-4">
|
||||||
className="flex flex-row items-center justify-center my-4"
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
Object.values(SelectorTabs).map((tab) => (
|
Object.values(SelectorTabs).map((tab) => (
|
||||||
<div
|
<div
|
||||||
@@ -140,9 +138,7 @@ export default function PersonCharacterSelectorModal({
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{/* Character Selector */}
|
{/* Character Selector */}
|
||||||
<div
|
<div className="m-8 max-w-200">
|
||||||
className="m-8 max-w-[50rem]"
|
|
||||||
>
|
|
||||||
<PersonCharacterSelector
|
<PersonCharacterSelector
|
||||||
personCharacters={currentlyVisibleCharacters}
|
personCharacters={currentlyVisibleCharacters}
|
||||||
selectedCharacterId={currentlySelectedCharacterId}
|
selectedCharacterId={currentlySelectedCharacterId}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export default function AllRaidGroupsDisplay(){
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupsCountQuery.status === "success"){
|
if(raidGroupsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidGroupsCountQuery ]);
|
}, [ raidGroupsCountQuery ]);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ export default function RaidGroupsByAccountDisplay({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupsCountQuery.status === "success"){
|
if(raidGroupsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidGroupsCountQuery ]);
|
}, [ raidGroupsCountQuery ]);
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export default function RaidGroupsByGameDisplay({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupsCountQuery.status === "success"){
|
if(raidGroupsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidGroupsCountQuery ]);
|
}, [ raidGroupsCountQuery ]);
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export default function RaidGroupModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidGroupName(raidGroup?.raidGroupName ?? "");
|
setRaidGroupName(raidGroup?.raidGroupName ?? "");
|
||||||
setRaidGroupIcon(raidGroup?.raidGroupIcon ?? "");
|
setRaidGroupIcon(raidGroup?.raidGroupIcon ?? "");
|
||||||
setGame(undefined);
|
setGame(undefined);
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ export default function RaidGroupRequestTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidGroupRequestsCountQuery.status === "success"){
|
if(raidGroupRequestsCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidGroupRequestsCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidGroupRequestsCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidGroupRequestsCountQuery ]);
|
}, [ raidGroupRequestsCountQuery ]);
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export default function RaidGroupRequestModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setCurrentPermission(RaidGroupPermissionType.RAIDER);
|
setCurrentPermission(RaidGroupPermissionType.RAIDER);
|
||||||
setRequestMessage(raidGroupRequest?.requestMessage ?? "");
|
setRequestMessage(raidGroupRequest?.requestMessage ?? "");
|
||||||
}, [ display, raidGroupRequest ]);
|
}, [ display, raidGroupRequest ]);
|
||||||
|
|||||||
@@ -118,13 +118,9 @@ export default function RaidInstanceHeader(){
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="flex flex-col items-center justify-center w-full h-full mb-16">
|
||||||
className="flex flex-col items-center justify-center w-full h-full mb-16"
|
|
||||||
>
|
|
||||||
{/* Raid Instance Name */}
|
{/* Raid Instance Name */}
|
||||||
<div
|
<div className="flex flex-col justify-center items-center min-w-240 text-center">
|
||||||
className="flex flex-col justify-center items-center min-w-[60rem] text-center"
|
|
||||||
>
|
|
||||||
<h1
|
<h1
|
||||||
className="flex flex-row items-center justify-center text-4xl"
|
className="flex flex-row items-center justify-center text-4xl"
|
||||||
>
|
>
|
||||||
@@ -143,9 +139,7 @@ export default function RaidInstanceHeader(){
|
|||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
{/* Start and End Dates */}
|
{/* Start and End Dates */}
|
||||||
<div
|
<div className="flex flex-row justify-center mt-4">
|
||||||
className="flex flex-row justify-center mt-4"
|
|
||||||
>
|
|
||||||
<DateInput
|
<DateInput
|
||||||
id={`raidInstance${raidInstance?.raidInstanceId}StartDate`}
|
id={`raidInstance${raidInstance?.raidInstanceId}StartDate`}
|
||||||
placeholder="Start Date"
|
placeholder="Start Date"
|
||||||
@@ -160,13 +154,9 @@ export default function RaidInstanceHeader(){
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Raid Size & Layout */}
|
{/* Raid Size & Layout */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center gap-x-4 mt-4">
|
||||||
className="flex flex-row items-center justify-center gap-x-4 mt-4"
|
|
||||||
>
|
|
||||||
{/* Raid Size */}
|
{/* Raid Size */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center">
|
||||||
className="flex flex-row items-center justify-center"
|
|
||||||
>
|
|
||||||
<NumberInput
|
<NumberInput
|
||||||
id={`raidInstance${raidInstance?.raidInstanceId}Size`}
|
id={`raidInstance${raidInstance?.raidInstanceId}Size`}
|
||||||
label="Raid Size"
|
label="Raid Size"
|
||||||
@@ -177,16 +167,12 @@ export default function RaidInstanceHeader(){
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Raid Layout */}
|
{/* Raid Layout */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center">
|
||||||
className="flex flex-row items-center justify-center"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
className="bg-inherit px-4 rounded-sm w-auto"
|
className="bg-inherit px-4 rounded-sm w-auto"
|
||||||
onClick={() => setDisplayRaidLayoutSelectorModal(true)}
|
onClick={() => setDisplayRaidLayoutSelectorModal(true)}
|
||||||
>
|
>
|
||||||
<div
|
<div className="relative bg-inherit">
|
||||||
className="relative bg-inherit"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
id="selectRaidLayoutButton"
|
id="selectRaidLayoutButton"
|
||||||
className="px-4 py-2 rounded-lg whitespace-nowrap cursor-pointer ring-2 ring-gray-500"
|
className="px-4 py-2 rounded-lg whitespace-nowrap cursor-pointer ring-2 ring-gray-500"
|
||||||
@@ -213,9 +199,7 @@ export default function RaidInstanceHeader(){
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Roster */}
|
{/* Roster */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center">
|
||||||
className="flex flex-row items-center justify-center"
|
|
||||||
>
|
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
onClick={() => setDisplayRosterSelectorModal(true)}
|
onClick={() => setDisplayRosterSelectorModal(true)}
|
||||||
>
|
>
|
||||||
@@ -230,9 +214,7 @@ export default function RaidInstanceHeader(){
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Save Button */}
|
{/* Save Button */}
|
||||||
<div
|
<div className="flex flex-row items-center justify-center ml-4">
|
||||||
className="flex flex-row items-center justify-center ml-4"
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
id="saveInstanceButton"
|
id="saveInstanceButton"
|
||||||
|
|||||||
@@ -77,11 +77,11 @@ function RaidInstanceSkeleton(){
|
|||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="startDate"
|
key="startDate"
|
||||||
className={`h-6 w-[26rem] mr-2 ${elementBg}`}
|
className={`h-6 w-104 mr-2 ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="endDate"
|
key="endDate"
|
||||||
className={`h-6 w-[26rem] mr-2 ${elementBg}`}
|
className={`h-6 w-104 mr-2 ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="size"
|
key="size"
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ export default function RaidInstanceTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidInstanceCountQuery.status === "success"){
|
if(raidInstanceCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidInstanceCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidInstanceCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidInstanceCountQuery ]);
|
}, [ raidInstanceCountQuery ]);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default function RaidInstanceCreator(){
|
|||||||
|
|
||||||
const updateClassGroupsLayout = (newSelectedClassGroup: ClassGroup | null | undefined) => {
|
const updateClassGroupsLayout = (newSelectedClassGroup: ClassGroup | null | undefined) => {
|
||||||
//Get all existing xrefs, leaving out the current xref it it's been removed
|
//Get all existing xrefs, leaving out the current xref it it's been removed
|
||||||
const newClassGroups = selectedClassGroups;
|
const newClassGroups = [...selectedClassGroups];
|
||||||
newClassGroups[currentLocation.col] = newSelectedClassGroup ?? null;
|
newClassGroups[currentLocation.col] = newSelectedClassGroup ?? null;
|
||||||
|
|
||||||
//Update the raid layout to persist the changes
|
//Update the raid layout to persist the changes
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ export default function RaidInstanceModal({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidInstance){
|
if(raidInstance){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidInstanceName(raidInstance.raidInstanceName ?? "");
|
setRaidInstanceName(raidInstance.raidInstanceName ?? "");
|
||||||
setRaidStartDate(raidInstance.raidStartDate);
|
setRaidStartDate(raidInstance.raidStartDate);
|
||||||
setRaidEndDate(raidInstance.raidEndDate);
|
setRaidEndDate(raidInstance.raidEndDate);
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export default function RaidLayoutList({
|
|||||||
|
|
||||||
const classGroupsQuery = useGetClassGroupsByRaidLayout(raidGroup.raidGroupId ?? "", selectedRaidLayout?.raidLayoutId);
|
const classGroupsQuery = useGetClassGroupsByRaidLayout(raidGroup.raidGroupId ?? "", selectedRaidLayout?.raidLayoutId);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setSelectedLayoutClassGroups(classGroupsQuery.data ?? []);
|
setSelectedLayoutClassGroups(classGroupsQuery.data ?? []);
|
||||||
}, [ classGroupsQuery.data ]);
|
}, [ classGroupsQuery.data ]);
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ function RaidLayoutSkeleton(){
|
|||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="classGroups"
|
key="classGroups"
|
||||||
className={`h-6 w-[56rem] ml-2 ${elementBg}`}
|
className={`h-6 w-4xl ml-2 ${elementBg}`}
|
||||||
/>,
|
/>,
|
||||||
<div
|
<div
|
||||||
key="actions"
|
key="actions"
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ export default function RaidLayoutTab({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(raidLayoutCountQuery.status === "success"){
|
if(raidLayoutCountQuery.status === "success"){
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setTotalPages(Math.ceil(raidLayoutCountQuery.data / pageSize));
|
setTotalPages(Math.ceil(raidLayoutCountQuery.data / pageSize));
|
||||||
}
|
}
|
||||||
}, [ raidLayoutCountQuery ]);
|
}, [ raidLayoutCountQuery ]);
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ export default function RaidLayoutModal({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setRaidLayoutName(raidLayout?.raidLayoutName ?? "");
|
setRaidLayoutName(raidLayout?.raidLayoutName ?? "");
|
||||||
setRaidLayoutSize(raidLayout?.raidSize ?? 0);
|
setRaidLayoutSize(raidLayout?.raidSize ?? 0);
|
||||||
setClassGroups(selectedClassGroups);
|
setClassGroups(selectedClassGroups);
|
||||||
|
|||||||
@@ -40,11 +40,15 @@ export default function RaidLayoutSelectorModal({
|
|||||||
|
|
||||||
//Update any changes to Raid Layout ID
|
//Update any changes to Raid Layout ID
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setCurrentlySelectedLayoutId(selectedRaidLayoutId);
|
setCurrentlySelectedLayoutId(selectedRaidLayoutId);
|
||||||
}, [ raidLayouts, selectedRaidLayoutId ]);
|
}, [ raidLayouts, selectedRaidLayoutId ]);
|
||||||
|
|
||||||
//Update page data when modal becomes visible
|
//Update page data when modal becomes visible
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setPage(1);
|
setPage(1);
|
||||||
setSearchTerm("");
|
setSearchTerm("");
|
||||||
}, [ display ]);
|
}, [ display ]);
|
||||||
@@ -53,6 +57,8 @@ export default function RaidLayoutSelectorModal({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const filteredLayouts = raidLayouts.filter((raidLayout) => raidLayout.raidLayoutName.toLowerCase().includes(searchTerm?.toLowerCase() ?? ""));
|
const filteredLayouts = raidLayouts.filter((raidLayout) => raidLayout.raidLayoutName.toLowerCase().includes(searchTerm?.toLowerCase() ?? ""));
|
||||||
|
|
||||||
|
//TODO: Fix this warning
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||||
setMatchingLayouts(filteredLayouts);
|
setMatchingLayouts(filteredLayouts);
|
||||||
setCurrentlyVisibleLayouts(filteredLayouts.slice((page - 1) * pageSize, page * pageSize));
|
setCurrentlyVisibleLayouts(filteredLayouts.slice((page - 1) * pageSize, page * pageSize));
|
||||||
}, [ page, searchTerm, raidLayouts ]);
|
}, [ page, searchTerm, raidLayouts ]);
|
||||||
|
|||||||
Reference in New Issue
Block a user