File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 ( ( ) => {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ interface PublishProps {
2020
2121export 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 ) ;
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments