Update dependencies
This commit is contained in:
@@ -72,7 +72,7 @@ export default function GameSelector({
|
||||
{
|
||||
"rounded-t-lg border-t-2 border-b": index === 0,
|
||||
"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)}
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function FileInput({
|
||||
}){
|
||||
return (
|
||||
<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
|
||||
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(() => {
|
||||
//TODO: Fix this warning. Use component library
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setMinValue(min ?? Number.MIN_VALUE);
|
||||
setMaxValue(max ?? Number.MAX_VALUE);
|
||||
setInputValue(value ?? defaultValue ?? 0);
|
||||
|
||||
@@ -36,6 +36,8 @@ export default function GamePage(){
|
||||
|
||||
useEffect(() => {
|
||||
if(gameQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setGame(gameQuery.data);
|
||||
}
|
||||
}, [ gameQuery ]);
|
||||
|
||||
@@ -19,11 +19,15 @@ export default function PersonPage(){
|
||||
const personQuery = useGetPerson(raidGroupId ?? "", personId ?? "", false);
|
||||
useEffect(() => {
|
||||
if(raidGroupQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidGroup(raidGroupQuery.data);
|
||||
}
|
||||
}, [ raidGroupQuery ]);
|
||||
useEffect(() => {
|
||||
if(personQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPerson(personQuery.data);
|
||||
}
|
||||
}, [ personQuery ]);
|
||||
|
||||
@@ -30,6 +30,8 @@ export default function RaidGroupPage(){
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidGroup(raidGroupQuery.data);
|
||||
}
|
||||
}, [ raidGroupQuery ]);
|
||||
|
||||
@@ -84,12 +84,16 @@ export function AuthProvider({
|
||||
|
||||
//Try to get the token on page load
|
||||
useEffect(() => {
|
||||
//TODO: Fix warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
void fetchToken();
|
||||
}, [ fetchToken ]);
|
||||
|
||||
//Update the tutorial status when fetched
|
||||
useEffect(() => {
|
||||
if(tutorialsStatusQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTutorialsStatus(tutorialsStatusQuery.data);
|
||||
}
|
||||
}, [ tutorialsStatusQuery.status, tutorialsStatusQuery.data ]);
|
||||
|
||||
@@ -50,6 +50,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 1");
|
||||
if(raidGroupQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidGroup(raidGroupQuery.data);
|
||||
}
|
||||
}, [ raidGroupQuery.status, raidGroupQuery.data ]);
|
||||
@@ -57,6 +59,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 2");
|
||||
if(classGroupsQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setClassGroups(classGroupsQuery.data);
|
||||
}
|
||||
}, [ classGroupsQuery.status, classGroupsQuery.data ]);
|
||||
@@ -64,6 +68,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 3");
|
||||
if(raidLayoutsQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidLayouts(raidLayoutsQuery.data);
|
||||
}
|
||||
}, [ raidLayoutsQuery.status, raidLayoutsQuery.data ]);
|
||||
@@ -71,6 +77,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 4");
|
||||
if(peopleQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPeople(peopleQuery.data);
|
||||
setRoster(peopleQuery.data);
|
||||
}
|
||||
@@ -79,6 +87,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 5");
|
||||
if(raidInstanceId && raidInstanceQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidInstance(raidInstanceQuery.data);
|
||||
if(!raidInstanceQuery.data.raidLayoutId){
|
||||
const newClassGroups: (ClassGroup | null)[] = [];
|
||||
@@ -97,6 +107,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 6");
|
||||
if(selectedClassGroupsQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setSelectedClassGroups(selectedClassGroupsQuery.data);
|
||||
}
|
||||
}, [ selectedClassGroupsQuery.status, selectedClassGroupsQuery.data ]);
|
||||
@@ -104,6 +116,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 7");
|
||||
if(personCharactersQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPersonCharacters(personCharactersQuery.data);
|
||||
}
|
||||
}, [ personCharactersQuery.status, personCharactersQuery.data ]);
|
||||
@@ -111,6 +125,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 8");
|
||||
if(personCharacterXrefsQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPersonCharacterXrefs(personCharacterXrefsQuery.data);
|
||||
}
|
||||
}, [ personCharacterXrefsQuery.status, personCharacterXrefsQuery.data, people ]);
|
||||
@@ -118,6 +134,8 @@ export default function RaidInstanceLayoutProvider({
|
||||
useEffect(() => {
|
||||
//console.log("hit 9");
|
||||
if(raidLayoutQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidLayout(raidLayoutQuery.data);
|
||||
}
|
||||
}, [ raidLayoutQuery.status, raidLayoutQuery.data ]);
|
||||
|
||||
@@ -14,6 +14,8 @@ export function TimedModalProvider({
|
||||
const [ display, setDisplay ] = useState(false);
|
||||
const [ messages, setMessages ] = useState<React.ReactNode[]>([]);
|
||||
const messagesRef = useRef<React.ReactNode[]>(messages);
|
||||
//TODO: Fix this error
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
messagesRef.current = messages;
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ export default function AdminAccountsTab(){
|
||||
|
||||
useEffect(() => {
|
||||
if(accountsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ accountsCountQuery ]);
|
||||
|
||||
@@ -39,6 +39,8 @@ export default function PasswordResetDisplay(){
|
||||
if(updatePasswordStatus === "success"){
|
||||
addSuccessMessage("Password updated successfully");
|
||||
updatePasswordReset();
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setCurrentPassword("");
|
||||
setNewPassword("");
|
||||
setConfirmPassword("");
|
||||
|
||||
@@ -35,6 +35,8 @@ export default function RaidGroupAccountsTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(accountsCountQuery.data){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(accountsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ accountsCountQuery.data ]);
|
||||
|
||||
@@ -27,6 +27,8 @@ export default function AccountModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setUsername(account?.username ?? "");
|
||||
setEmail(account?.email ?? "");
|
||||
setPassword(account?.password ?? "");
|
||||
|
||||
@@ -29,6 +29,8 @@ export default function AccountRaidGroupPermissionsModal({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupPermissionsQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setCurrentPermission(raidGroupPermissionsQuery.data);
|
||||
}
|
||||
else if(raidGroupPermissionsQuery.status === "error"){
|
||||
|
||||
@@ -120,6 +120,8 @@ export default function CalendarEventModal({
|
||||
|
||||
useEffect(() => {
|
||||
if(calendarEvent){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setEventName(calendarEvent?.eventName ?? "");
|
||||
setEventDescription(calendarEvent?.eventDescription ?? "");
|
||||
setEventStartDate(calendarEvent.eventStartDate);
|
||||
|
||||
@@ -63,7 +63,7 @@ function ClassGroupSkeleton(): React.ReactNode[]{
|
||||
/>,
|
||||
<div
|
||||
key="classes"
|
||||
className={`h-6 w-[64rem] ${elementBg}`}
|
||||
className={`h-6 w-5xl ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="actions"
|
||||
|
||||
@@ -41,6 +41,8 @@ export default function ClassGroupsTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(classGroupsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(classGroupsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ classGroupsCountQuery ]);
|
||||
|
||||
@@ -30,6 +30,8 @@ export default function ClassGroupModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setClassGroupName(classGroup?.classGroupName ?? "");
|
||||
setSelectedGameClassIds(selectedGameClasses.map(gc => gc.gameClassId ?? ""));
|
||||
}, [ display, classGroup, selectedGameClasses ]);
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function SelectClassGroupModal({
|
||||
modalHeader="Select Class Group"
|
||||
modalBody={
|
||||
<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%"}}
|
||||
>
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ export default function AllGamesDisplay(){
|
||||
|
||||
useEffect(() => {
|
||||
if(gamesCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(gamesCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ gamesCountQuery ]);
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function GamesListSkeleton(){
|
||||
GameSkeleton(),
|
||||
GameSkeleton(),
|
||||
GameSkeleton(),
|
||||
GameSkeleton(),
|
||||
GameSkeleton()
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ export default function GameModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setGameName(game?.gameName ?? "");
|
||||
setGameIcon(game?.gameIcon ?? "");
|
||||
}, [ display, game, setGameName, setGameIcon ]);
|
||||
|
||||
@@ -31,6 +31,8 @@ export default function GameClassDisplay({
|
||||
|
||||
useEffect(() => {
|
||||
if(gameClassCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(gameClassCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ gameClassCountQuery ]);
|
||||
|
||||
@@ -27,6 +27,8 @@ export default function GameClassModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setGameClassName(gameClass?.gameClassName ?? "");
|
||||
setGameClassIcon(gameClass?.gameClassIcon);
|
||||
setIconFile(null);
|
||||
|
||||
@@ -45,6 +45,8 @@ export default function PersonDisplay({
|
||||
|
||||
useEffect(() => {
|
||||
if(characterCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(characterCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ characterCountQuery ]);
|
||||
|
||||
@@ -69,7 +69,7 @@ export function PersonSkeleton(): React.ReactNode[]{
|
||||
/>,
|
||||
<div
|
||||
key="characters"
|
||||
className={`h-6 w-[48rem] ${elementBg}`}
|
||||
className={`h-6 w-3xl ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="actions"
|
||||
|
||||
@@ -41,6 +41,8 @@ export default function PersonTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(personCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(personCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ personCountQuery ]);
|
||||
|
||||
@@ -25,6 +25,8 @@ export default function PersonModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPersonName(person?.personName ?? "");
|
||||
setDiscordId(person?.discordId ?? "");
|
||||
}, [ display, person, raidGroupId, setPersonName, setDiscordId ]);
|
||||
|
||||
@@ -75,7 +75,7 @@ function PersonCharacterSkeleton(): React.ReactNode[]{
|
||||
/>,
|
||||
<div
|
||||
key="comments"
|
||||
className={`h-6 w-[32rem] ${elementBg}`}
|
||||
className={`h-6 w-lg ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="actions"
|
||||
|
||||
@@ -33,6 +33,8 @@ export default function PersonCharacterModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setCharacterName(personCharacter?.characterName ?? "");
|
||||
setGameClassId(personCharacter?.gameClassId);
|
||||
setCharacterRating(personCharacter?.characterRating);
|
||||
|
||||
@@ -118,9 +118,7 @@ export default function PersonCharacterSelectorModal({
|
||||
/>
|
||||
</div>
|
||||
{/* Tabs */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center my-4"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center my-4">
|
||||
{
|
||||
Object.values(SelectorTabs).map((tab) => (
|
||||
<div
|
||||
@@ -140,9 +138,7 @@ export default function PersonCharacterSelectorModal({
|
||||
}
|
||||
</div>
|
||||
{/* Character Selector */}
|
||||
<div
|
||||
className="m-8 max-w-[50rem]"
|
||||
>
|
||||
<div className="m-8 max-w-200">
|
||||
<PersonCharacterSelector
|
||||
personCharacters={currentlyVisibleCharacters}
|
||||
selectedCharacterId={currentlySelectedCharacterId}
|
||||
|
||||
@@ -27,6 +27,8 @@ export default function AllRaidGroupsDisplay(){
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidGroupsCountQuery ]);
|
||||
|
||||
@@ -36,6 +36,8 @@ export default function RaidGroupsByAccountDisplay({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidGroupsCountQuery ]);
|
||||
|
||||
@@ -31,6 +31,8 @@ export default function RaidGroupsByGameDisplay({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidGroupsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidGroupsCountQuery ]);
|
||||
|
||||
@@ -29,6 +29,8 @@ export default function RaidGroupModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidGroupName(raidGroup?.raidGroupName ?? "");
|
||||
setRaidGroupIcon(raidGroup?.raidGroupIcon ?? "");
|
||||
setGame(undefined);
|
||||
|
||||
@@ -34,6 +34,8 @@ export default function RaidGroupRequestTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidGroupRequestsCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidGroupRequestsCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidGroupRequestsCountQuery ]);
|
||||
|
||||
@@ -27,6 +27,8 @@ export default function RaidGroupRequestModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setCurrentPermission(RaidGroupPermissionType.RAIDER);
|
||||
setRequestMessage(raidGroupRequest?.requestMessage ?? "");
|
||||
}, [ display, raidGroupRequest ]);
|
||||
|
||||
@@ -118,13 +118,9 @@ export default function RaidInstanceHeader(){
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center w-full h-full mb-16"
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center w-full h-full mb-16">
|
||||
{/* Raid Instance Name */}
|
||||
<div
|
||||
className="flex flex-col justify-center items-center min-w-[60rem] text-center"
|
||||
>
|
||||
<div className="flex flex-col justify-center items-center min-w-240 text-center">
|
||||
<h1
|
||||
className="flex flex-row items-center justify-center text-4xl"
|
||||
>
|
||||
@@ -143,9 +139,7 @@ export default function RaidInstanceHeader(){
|
||||
</h1>
|
||||
</div>
|
||||
{/* Start and End Dates */}
|
||||
<div
|
||||
className="flex flex-row justify-center mt-4"
|
||||
>
|
||||
<div className="flex flex-row justify-center mt-4">
|
||||
<DateInput
|
||||
id={`raidInstance${raidInstance?.raidInstanceId}StartDate`}
|
||||
placeholder="Start Date"
|
||||
@@ -160,13 +154,9 @@ export default function RaidInstanceHeader(){
|
||||
/>
|
||||
</div>
|
||||
{/* Raid Size & Layout */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center gap-x-4 mt-4"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center gap-x-4 mt-4">
|
||||
{/* Raid Size */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center">
|
||||
<NumberInput
|
||||
id={`raidInstance${raidInstance?.raidInstanceId}Size`}
|
||||
label="Raid Size"
|
||||
@@ -177,16 +167,12 @@ export default function RaidInstanceHeader(){
|
||||
/>
|
||||
</div>
|
||||
{/* Raid Layout */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center">
|
||||
<div
|
||||
className="bg-inherit px-4 rounded-sm w-auto"
|
||||
onClick={() => setDisplayRaidLayoutSelectorModal(true)}
|
||||
>
|
||||
<div
|
||||
className="relative bg-inherit"
|
||||
>
|
||||
<div className="relative bg-inherit">
|
||||
<div
|
||||
id="selectRaidLayoutButton"
|
||||
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>
|
||||
{/* Roster */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center">
|
||||
<PrimaryButton
|
||||
onClick={() => setDisplayRosterSelectorModal(true)}
|
||||
>
|
||||
@@ -230,9 +214,7 @@ export default function RaidInstanceHeader(){
|
||||
/>
|
||||
</div>
|
||||
{/* Save Button */}
|
||||
<div
|
||||
className="flex flex-row items-center justify-center ml-4"
|
||||
>
|
||||
<div className="flex flex-row items-center justify-center ml-4">
|
||||
{
|
||||
<PrimaryButton
|
||||
id="saveInstanceButton"
|
||||
|
||||
@@ -77,11 +77,11 @@ function RaidInstanceSkeleton(){
|
||||
/>,
|
||||
<div
|
||||
key="startDate"
|
||||
className={`h-6 w-[26rem] mr-2 ${elementBg}`}
|
||||
className={`h-6 w-104 mr-2 ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="endDate"
|
||||
className={`h-6 w-[26rem] mr-2 ${elementBg}`}
|
||||
className={`h-6 w-104 mr-2 ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="size"
|
||||
|
||||
@@ -42,6 +42,8 @@ export default function RaidInstanceTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidInstanceCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidInstanceCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidInstanceCountQuery ]);
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function RaidInstanceCreator(){
|
||||
|
||||
const updateClassGroupsLayout = (newSelectedClassGroup: ClassGroup | null | undefined) => {
|
||||
//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;
|
||||
|
||||
//Update the raid layout to persist the changes
|
||||
|
||||
@@ -36,6 +36,8 @@ export default function RaidInstanceModal({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidInstance){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidInstanceName(raidInstance.raidInstanceName ?? "");
|
||||
setRaidStartDate(raidInstance.raidStartDate);
|
||||
setRaidEndDate(raidInstance.raidEndDate);
|
||||
|
||||
@@ -28,6 +28,8 @@ export default function RaidLayoutList({
|
||||
|
||||
const classGroupsQuery = useGetClassGroupsByRaidLayout(raidGroup.raidGroupId ?? "", selectedRaidLayout?.raidLayoutId);
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setSelectedLayoutClassGroups(classGroupsQuery.data ?? []);
|
||||
}, [ classGroupsQuery.data ]);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ function RaidLayoutSkeleton(){
|
||||
/>,
|
||||
<div
|
||||
key="classGroups"
|
||||
className={`h-6 w-[56rem] ml-2 ${elementBg}`}
|
||||
className={`h-6 w-4xl ml-2 ${elementBg}`}
|
||||
/>,
|
||||
<div
|
||||
key="actions"
|
||||
|
||||
@@ -40,6 +40,8 @@ export default function RaidLayoutTab({
|
||||
|
||||
useEffect(() => {
|
||||
if(raidLayoutCountQuery.status === "success"){
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTotalPages(Math.ceil(raidLayoutCountQuery.data / pageSize));
|
||||
}
|
||||
}, [ raidLayoutCountQuery ]);
|
||||
|
||||
@@ -32,6 +32,8 @@ export default function RaidLayoutModal({
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setRaidLayoutName(raidLayout?.raidLayoutName ?? "");
|
||||
setRaidLayoutSize(raidLayout?.raidSize ?? 0);
|
||||
setClassGroups(selectedClassGroups);
|
||||
|
||||
@@ -40,11 +40,15 @@ export default function RaidLayoutSelectorModal({
|
||||
|
||||
//Update any changes to Raid Layout ID
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setCurrentlySelectedLayoutId(selectedRaidLayoutId);
|
||||
}, [ raidLayouts, selectedRaidLayoutId ]);
|
||||
|
||||
//Update page data when modal becomes visible
|
||||
useEffect(() => {
|
||||
//TODO: Fix this warning
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setPage(1);
|
||||
setSearchTerm("");
|
||||
}, [ display ]);
|
||||
@@ -53,6 +57,8 @@ export default function RaidLayoutSelectorModal({
|
||||
useEffect(() => {
|
||||
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);
|
||||
setCurrentlyVisibleLayouts(filteredLayouts.slice((page - 1) * pageSize, page * pageSize));
|
||||
}, [ page, searchTerm, raidLayouts ]);
|
||||
|
||||
Reference in New Issue
Block a user