Skip to content

Commit 1551d9d

Browse files
committed
CodeQL fixes
1 parent 408515d commit 1551d9d

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

apps/web/app/(with-contexts)/dashboard/(sidebar)/products/new/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function Page() {
127127
disabled={
128128
!title ||
129129
!type ||
130-
(!!title && !!type && loading) ||
130+
loading ||
131131
actionSuccessful
132132
}
133133
onClick={createCourse}

apps/web/components/admin/blogs/editor/details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function Details({ id }: DetailsProps) {
3535
const [loading, setLoading] = useState(false);
3636
const address = useContext(AddressContext);
3737
const { profile } = useContext(ProfileContext);
38-
const course = useCourse(id, address);
38+
const course = useCourse(id);
3939
const { toast } = useToast();
4040

4141
useEffect(() => {

apps/web/components/admin/blogs/editor/publish.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface PublishProps {
2020

2121
export default function Publish({ id }: PublishProps) {
2222
const address = useContext(AddressContext);
23-
let course = useCourse(id, address);
23+
let course = useCourse(id);
2424
const [published, setPublished] = useState(course?.published);
2525
const [privacy, setPrivacy] = useState(course?.privacy);
2626
const [loading, setLoading] = useState(false);

apps/web/components/admin/pages/new-page.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ const NewPage = () => {
9797
</p>
9898
<div className="flex gap-2">
9999
<Button
100-
disabled={
101-
!name ||
102-
!pageId ||
103-
(!!name && !!pageId && loading) ||
104-
loading
105-
}
100+
disabled={!name || !pageId || loading}
106101
onClick={createPage}
107102
sx={{ mr: 1 }}
108103
>

0 commit comments

Comments
 (0)